Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sp + text to varchar

Status
Not open for further replies.

vlitim

Programmer
Joined
Sep 2, 2000
Messages
393
Location
GB
I have a text field that I need to grab the first 255 characters and insert it into a varchar(255) field. Can someone please help me!
 
You should be able to put a text field inside a varchar field using a simple insert or update statement. Use the left(textfieldname,255) function to get the first 255 characters from the text field. Mark

The key to immortality is to make a big impression in this life!!
 
I have tried that but I get the error:

Argument data type text is invalid for argument 1 of left function
 
This works

convert(varchar(255),comment)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top