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
RPC to DC not working error 1722
Ftp Password
How to check open ports in remote computers?
How to change @@servername?
Java issues with IE8, also can't install Firefox or Chrome
Access variable field locking
Remote Web Workplace does not work outside the LAN
How do I set up Exchange 2007 Activesync to work with PDAs that can sync to Exchange Server
How do I Recover/ Repair a "Messed Up" Main Switchboard
Any free software for getting stats reports from Print servers.