Microsoft
Software
Hardware
Network
Question : Remove first 5 characters from SQL
I have an SQL2005 database and I need to remove the first five characters of a field named 'DESC'. I'm getting a syntax error when I try to use this:
UPDATE files
SET [desc] = RIGHT([Desc], len([desc]) - 5)
WHERE (CUSTNO = 02028) AND (tempid = 0080088)
Answer : Remove first 5 characters from SQL
Hello RavenTim,
Based on the leading zeroes I surmise that CUSTNO and tempid are strings, thus:
UPDATE files
SET [desc] = RIGHT([Desc], len([desc]) - 5)
WHERE (CUSTNO = '02028') AND (tempid = '0080088')
Regards,
Patrick
Random Solutions
streaming movies to xbox360 over lan
Userform modeless - modal
How to I get a contact us page with forms to send information
sp3 will not update
Sharepoint 2007 Date/Time Setting on bottom of Pages is incorrect
Check to see if a column name in a linked table has changed
Move database in exchange 2007
Access 2007 VBA Report onFormat ignored on open
What is the difference between a MSI and MST file.?
Access problem after installing