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
cannot connect SQLOLEDB to distance server
event 2436
Toggle Buttons!!!
HTTP/1.1 503 Service Unavailable after server reboot
Undefined Functions in Access 2003 MDE
Control lock Question
export to excel from dataset
VBA code to prompt user to enter a password when the user wants to access a form or report in DESIGN view
Access query to select highest number in field
Unable to view sharepoint sites from PDA