have table with two columns with datatypes as number and
varchar and the values in
A column like 1,2,3 AND B column values like a,b,c.
now need to display data in a single column as 1,a,2,b,3,c.

Answer Posted / prativa mishra

select rtrim(xmlagg(xmlelement("c",A||' ,'||B||',')).extract('//test()'),',') single_column
from table_name

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is collation? : Sql dba

616


What is basic structure of pl sql?

503


How long does it take to learn pl sql?

610


If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????

3550


hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews

1528






What is the non-clustered index in sql?

589


how to include comments in sql statements? : Sql dba

547


What is a temporal table?

497


Can a select statement fire a trigger?

662


How to handle bulk data?

891


Is sql microsoft?

547


What is data type in sql?

556


How can the performance of a trigger be improved?

592


How do you create a db file?

523


How we can update the view?

603