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

urgent?

Status
Not open for further replies.

rose70

Programmer
Jul 4, 2004
15
CA
appreciate if anybody can help me with the row to column conversion. Like for exampleIn a single row I have something like this.

TABLE SOURCEE
EMPID-------------SAL
101 3000
101 4000
101 4200
101 5000
102 3200
102 3800
102 4200
102 4800
103 3100
103 3700
103 4300
....
AND I WANT LIKE THIS TARGET TABLE
EMPID--------sal1998------sal1999------sal2000------
101 3000 4000 4200 5000
102 3200 3800 4200 4800
103 3100 3700 4300 4900
THANKS
 
If you have a report writer with crosstab capability this should be easy.

I'm not sure how to do it but you could try it in Excel.
 
This question might be better posed in one of the database programming forums, SQL Server, Oracle, etc.

-------------------------
The trouble with doing something right the first time is that noboby appreciates how difficult it was.
- Steven Wright
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top