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

blank space charactters

Status
Not open for further replies.

jvande

MIS
Jun 6, 2001
115
US
Is there a query that I can write that will search a field for a blank space before a character. For example I have a field that is 2 digits long. i.e. 04 but sometimes it is entered in the system blank 4. What would the query look like that updates the field to 04? I want it to update all blank characters to 0.

Thanks,
Josh
 
Update tablename
Set fieldname = '0' + substring(fieldname, 2, 1)
Where substring(Fieldname, 1, 1) = ' ' Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / ASP / Crystal / SQLServer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top