|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, March 05, 2013 3:24 PM
Points: 6,
Visits: 25
|
|
Hi Guys
I have a field called Account.
It consits of the following sample data.
0090 >100 0091 0092
I need a script that will strip the leading zero of the 0090 data and the another to add a zero to the back.
So in the end, the sample data will look like this (With the >100 data not being affected.
0900 >100 0910 0920
Thanking you in Advance.
Andre
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, March 05, 2013 3:24 PM
Points: 6,
Visits: 25
|
|
Hi Again
Further to this I have also tried the following
UPDATE tablename SET column = Ltrim(column,'0');
But i get this when I parse
Msg 174, Level 15, State 1, Line 2 The ltrim function requires 1 argument(s).
Any ideas?
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 2:26 AM
Points: 1,289,
Visits: 3,859
|
|
update tablename set column = stuff(column,1,1,'')+'0' where column like '009_';
MM
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, March 05, 2013 3:24 PM
Points: 6,
Visits: 25
|
|
Hi Miste.Magoo
Thanks for that, worked like a dream.
Appreciate the assistance!
A
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 2:26 AM
Points: 1,289,
Visits: 3,859
|
|
C-kweldude (2/20/2013)
Hi Miste.Magoo Thanks for that, worked like a dream. Appreciate the assistance!  A
You are most welcome
MM
|
|
|
|