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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remoing blank characters in a string of text

Status
Not open for further replies.

grayt26

Technical User
Jun 2, 2006
26
GB
Hi all,


I have a table and dotted within multiple rows of that tables are strings of text that seem to have blanks at the end of them, so....


'abc ' instead of 'abc'


This is causing me to have duplicates when i export out of sql.


Is there an easy way of sweeping the whole table and removing these?

Thanks
 
Code:
UPDATE MyTable SET MyStringField = LTRIM(RTRIM(MyStringField))
Make all fields (of course only these you need) to be varchar instead of CHAR(xx) before that.

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
ok thanks that has helped on some of the fields.

thanks
 
And what doesn't works on others?

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top