Can anyone guide how to retrieve, update and insert data in column having 'Text' datatype? I am a newbie and i havent' done this yet.
Thanks in advance.
If you are using SQL Server 2005 consider using a VARCHAR(MAX) or NVARCHAR(MAX) instead of a text datatype. Look up the VARCHAR(MAX) and TEXT datatypes in books online.|||No. i am using sql 2000 and i wanted to know the method of retriving and updating data usign text datatypes.
thanksk,
|||Use it in the same manner that you would use a normal varchar column. The only difference is that when using it in a where condition you can't use the '=' operator. You have to use 'like'. Other than that inserting, updating and retrieving is exactly the same.Best regards,
Sami Samir|||
Please see the links below for some samples. For text/ntext/image value manipulation, you can use UPDATETEXT/WRITETEXT/READTEXT or SELECT/INSERT/UPDATE statements depending on your needs. There are functions like DATALENGTH and PATINDEX that will work with these data types too.
http://www.umachandar.com/technical/SQL6x70Scripts/Main53.htm
http://www.umachandar.com/technical/SQL6x70Scripts/Main63.htm
http://www.umachandar.com/technical/SQL6x70Scripts/Main12.htm
No comments:
Post a Comment