Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

PLEASE HELP ****** Stripping #s from one column to update 2 columns *******

$
0
0
Hi-Can you please help me figure out why my results are duplicating. Original field looks like this 7 1601081408920063I would like to take 7 and update another field with it, Than I would like to take 1601081408920063 and update the Original field with it so it will no longer contain the 7.select left (Original,1) as FC, right(Original,20) as OrigNuminto #temp1 from Numbers_Table cm where cm.[status] <>'9' and (cm.Original like'6%' or cm.Original like '7%' or cm.Original like '8%' )select * from #temp1FC OrigNum7 16010814089200637 16010814089200637 15072108920063007 1507210892006300

Viewing all articles
Browse latest Browse all 3145

Trending Articles