Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 delete the 5th Char

Author  Topic 

Waxman
Starting Member

6 Posts

Posted - 2010-07-26 : 19:36:01
I'm trying to delete the 5th Char in a string of 5 all in the same col

7001A
7001B
etc

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-26 : 19:50:23
SELECT LEFT(YourColumn, 4)
FROM YourTable

UPDATE YourTable
SET YourColumn = LEFT(YourColumn, 4)

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Waxman
Starting Member

6 Posts

Posted - 2010-07-26 : 22:41:33
Thank you Goddess
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-27 : 13:16:15


Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-07-27 : 13:23:58
Hope you have no data in columns 6-n

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -