Vasavi-372817
Grasshopper
Points: 12
More actions
September 3, 2009 at 9:56 am
#204337
I have a TEXT column in a table and it has leading spaces..How do I get rid of it? What sql server function can I use?
Ian Hockaday-345931
SSC Veteran
Points: 264
September 3, 2009 at 10:16 am
#1048891
You could use:
LTRIM(CAST([textfield] AS VARCHAR(MAX)))
if the txt field isn't too big..... 🙂
September 3, 2009 at 10:31 am
#1048903
Will this function work if the size is 20,000 bytes...
September 3, 2009 at 10:46 am
#1048912
The VARCHAR(MAX) field size is very close to 2Gb - 20k should not be a problem - a quick test would tell you, no?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply