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
Why am I getting this clipboard warning message on IE8?
How do I use a user-defined function in Access
InfoPath 2007: Error on file open, "InfoPath cannot create a new, blank form"
Need to query if a field starts with "+1"
SharePoint Services Site Image
Disappearing Appointments in Exchange 2007, Outlook 2007 mailboxes
Access Loop Query
Building a TreeView
How do I populate one spreadsheet from a filtered version of another?
WS-Security and WSDL