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

combining columns

Status
Not open for further replies.

maesb

Technical User
Mar 25, 2003
30
JP
Hi..

I'm trying to query a few columns from my table, but i would like it to return those few columns as one. my table looks something like this :

add1 add2 add3
Unit 101 East Malvern Caulfield

i want to select add1, add2 and add3 as address, with a comma as a deliminator. so the output for that query will be:

Unit 101,East Malvern,Caulfield

is that possible? thanks.
 
Hi,

Try:

select add1||', '||add2||', '||add3 AS "NEW COLUMN NAME"
from mytable;

J.
 
why didn't i think of that? lol.. thanks a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top