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

Extracting a number of characters from a field??

Status
Not open for further replies.

kilabru

Programmer
Oct 15, 2002
26
0
0
US
I have two fields A & B.
A B
1234567 Holly, Robert

I want to pull the first three numbers from A and the first three letters from B and conectate them in another field. Can anyone tell me how to do this?

Thanks
 
G'day mate,

Try this

This table, names, has 3 fields A, B and C. A and B have the number and char data and the concatenated result will be placed in C.

update names
set c = substr(a,1,3)||substr(b,1,3);

Enjoy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top