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

Update Query advice 1

Status
Not open for further replies.

perrydaniel

Technical User
Apr 27, 2004
56
IE
Hi

I have a table that has a reference number, I would like to add a letter to the front of the reference number. How would i go about doing this in an update query?

Thanks

Perry
 
Something like this ?
UPDATE yourTable SET [Reference Number] = "A" & [Reference Number] WHERE Left([Reference Number], 1) <> "A";

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
BTW, is the [Reference Number] field defined as numeric ?
If yes, take a look at the ALTER TABLE instruction.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top