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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Selecting the last 4 characters in a column

Author  Topic 

rlull
Starting Member

39 Posts

Posted - 2008-02-22 : 11:55:40
I need to select the last 4 characters from one column and insert them into a different column in the same table. How do I do this? Thanks.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-22 : 12:02:40
UPDATE Table
SET DestCol=RIGHT(SourceCol,4)
Go to Top of Page

rlull
Starting Member

39 Posts

Posted - 2008-02-22 : 12:06:43
Perfect, thanks.
Go to Top of Page
   

- Advertisement -