-
Junior Member
SQL Query
How to convert rows in column using SQL in Oracle;
for example
sl_no
1
2
3
4
output is 1234;
How to convert one column value into rows using SQL
for example
employee_name
Kumar
output
K
u
m
a
r
-
Expert Member
Re: SQL Query
Which database you are trying this query.. Here is an example ..
if you are using Oracle .. have you tried using LISTAGG, over .. again depends on the version you are using
[IMG]www.geekinterview.com/image/ora6.gif[/IMG]
-
Junior Member
Re: SQL Query
Nice. Can you say how to get this output in SQL Server ??
-
Expert Member
Re: SQL Query
in SQL Server, you can use COALESCE or case combination to get same output ..
or if you are using sql server 2008 , use pivot
Here is a good example for sql server Convert Rows to Columns
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules