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
Cursor not declared when trying to connect
Design a form
Converting nvarchar to datetime in mssql?
Problems with ISA 2006
Flushdns and Enter your website then ping
Determine which WAN Connection to use?
Public Folder snycing issue
How do you pull the AD username of the person logged onto computer into Infopath form?
Adding a toolbar
RANKING CONTAINS