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

prepend number

Status
Not open for further replies.

techie

MIS
Apr 13, 2000
1
US
how can I update all values in a field with a number "2" in front of the current data?
 
Do an UPDATE - you will need to use CAST to ensure the 2 is seen as a character:

UPDATE mytable SET name = concat( CAST( '2' AS CHAR ) , name )

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top