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
convert a jpg, jpeg, bmp,tiff or gif images in a ico image
using OpenCurrentDatabase to open a accdr file
"waiting for all snap-ins to complete" on 2008 T/S
Microfocus cobol app in windows 7
winlogon log
Pivot Table in Excel - refresh button disabled - why????
Exchange Sever 2007, forwarding to multiple recipients
Compare two spreadsheets
Export Gridview to csv file - btnExportCSV_Click
Form Dirty Values Lost on Forms 2.0 Scrollbar Methods :(