Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update record and remove leading blank 1

Status
Not open for further replies.

kskid

Technical User
Mar 21, 2003
1,767
US
I use the following select to pull the erroneous records with leading blanks but can't quite figure out how incorporate it into an update transactions

select leftrim(fname,' ')
from master
where substr(fname,1,1) = ' '
and fname is not null
 
UPDATE master SET fname = LTRIM(fname) WHERE fname IS NOT NULL;
 
Worked great!

Thanks! Worthy of a star!

-LW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top