converting row to single column(i.e to a single row)
Posted: Mon Apr 24, 2006 11:52 am
Hi All,
let me know if you could advise me on below question.
I have a table called tab1 with a column called name1 and this is a reference table, so it may not have records more than 1000 any time.
when i do select name1 from tab1 it will give some rows in output but i need to make all those row into one single row and use it for my processing......please let me know how can i do this.....
with out any basic routine
for ex: out put of my sql is(5) rows
AISHWARYA
MADHURI
SRIDEVI
PRIYANKA
RAANI
out put should be like below
AISHWARYAMADHURISRIDEVIPRIYANKARAANI
or
AISHWARYA,MADHURI,SRIDEVI,PRIYANKA,RAANI
both these formats are ok for me.....note: no of records in tab1 are not fixed..............
Starter
let me know if you could advise me on below question.
I have a table called tab1 with a column called name1 and this is a reference table, so it may not have records more than 1000 any time.
when i do select name1 from tab1 it will give some rows in output but i need to make all those row into one single row and use it for my processing......please let me know how can i do this.....
with out any basic routine
for ex: out put of my sql is(5) rows
AISHWARYA
MADHURI
SRIDEVI
PRIYANKA
RAANI
out put should be like below
AISHWARYAMADHURISRIDEVIPRIYANKARAANI
or
AISHWARYA,MADHURI,SRIDEVI,PRIYANKA,RAANI
both these formats are ok for me.....note: no of records in tab1 are not fixed..............
Starter