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

Update query

Status
Not open for further replies.

Monzer

Programmer
May 24, 2002
26
0
0
CA
Hi; I cant beleive that I cant solve this one!!!

I have an update query and its going to update several fields based on parameters. Its all good and working fine except one field. Its the ID field, I just want it to update this field by adding the letter "R" before the ID number.

EX: if the ID field is "565" I want the query to update it to "R565". The ID field is a text field already.

Thanks in advance for any help.
 
UPDATE yourTable SET ID = "R" & ID WHERE ID Like '[0-9]*'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi PHV;

The query didnt work. It updated the ID field to -1.

Thanks
 
you mean you ran the exact query that PHV listed above and it changed ALL the ID fields to -1?

Leslie
 
Hi;

I was trying it only with one record. Its original ID was 200 and after I ran the update query it changed to -1.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top