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
MS Access Powerpoint VBA
Turn off Access 2007 Current Version Check
Fox 9 and reports creating Variables
Update Temp Recordset using VBA
Microsoft Outlook Delayed delivery option- Would like time stamp to show in sent items when email is actually sent and not when its activated
Argument not specified for parameter 'sender' of 'Protected Sub EmailRegAttendeeNotices_Cl<wbr />ick(sender<wbr /> As Object, e As System.EventArgs)'.
How to set a font to a CMenu ?
The string was not recognized as a valid DateTime. There is a unknown word starting at index 0.
if statement in C#
ASP.NET SOAP Server/Client with Complex Types