I want to take transpose of data using single SQl statement.
For example,
empno Name
1 a
2 b
3 c
4 d
. .
. .
as
empno 1 2 3 4 ..........
name a b c d.........
Thanks in advance
Mandip
I want to take transpose of data using single SQl statement.
For example,
empno Name
1 a
2 b
3 c
4 d
. .
. .
as
empno 1 2 3 4 ..........
name a b c d.........
Thanks in advance
Mandip
Transpose of Data
Ozberg
HI both the above techniques are OK.... I agree... My requirement is like I am using SQl server 2000... on more you can think any database.... SQl, Oracle,MySQL etc.... is there any generic SQL statement which can do the job .... because all the above solutions i have worked out. you are perfectly allright Umachandar that there are other issues too.....
Basically this was asked at some interview to me that you don't have capabilities of reporting tools.... plus you are not supposed to use pivot functinality...plus not by any programming script.... just do it using single SQl :)
and being having 3 years of experience in SQL development... according to me atleast in SQL server , I was unable to devise such a query....
My motive is simple if is there any way.... please come up with that simple statement...
thanks in advance
mandip
MaqboolHussain
David Zokaites