Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
heze
Posting Yak Master
192 Posts |
Posted - 2006-03-22 : 23:50:39
|
| HiHOw can I extract text from a text field without having it truncated I am using:----------DECLARE @ptrval varbinary(16)SELECT top 1 @ptrval = TEXTPTR(MyField ) FROM [MyTAble] pr where A='23' READTEXT [MyTAble].MyField @ptrval 0 50-----------------when I use 50 it works, when I use 51 the output is:Server: Msg 7124, Level 16, State 1, Line 8The offset and length specified in the READTEXT statement is greater than the actual data length of 50.------Please helpTHank you |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-03-23 : 01:23:18
|
| Post the table structure of MyTableMadhivananFailing to plan is Planning to fail |
 |
|
|
heze
Posting Yak Master
192 Posts |
Posted - 2006-03-23 : 01:31:37
|
| CREATE TABLE MyTable( emp_id int, MyField text) |
 |
|
|
heze
Posting Yak Master
192 Posts |
Posted - 2006-03-23 : 01:34:22
|
| mad,THe process is the following, text is inserted by the user via a web page, then the content populates MyField on submit.It is then when I am querying, I wonder if the user's input is being inserted completely or I'm just not being technically proficient to extract text the appropriate way,thank you |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-03-23 : 02:02:12
|
| What type of text does the user enter? Cant you use varchar datatype?MadhivananFailing to plan is Planning to fail |
 |
|
|
heze
Posting Yak Master
192 Posts |
Posted - 2006-03-23 : 02:50:02
|
| I actually spotted at least the point where the problem is happening,i think. THe users input is inserted into an Access table, then I import it to SQL server. In access there is no problem, I can see and query the entire text, however when I import the MS access table into sql server using the import wizard, the text is trimmed I can only see a small fraction of the original text,thank you |
 |
|
|
heze
Posting Yak Master
192 Posts |
Posted - 2006-03-23 : 02:51:18
|
| by the way, the data type in MS Access is memo whilst the ne used in sql Server is nText |
 |
|
|
|
|
|
|
|