Hi,
I have a staff table like this:
name year salary
============================
a 1998 50
a 1999 100
a 2000 200
a 2001 300
b 2000 200
b 2001 300
I want to get a new table from the above table:
name salary(1998) salary(1999) salary(2000) salary(2001)
===================================================================
a 50 100 200 300
b 0 0 200 300
NB-no of years may increase over time so it should be a generic code
What's the SQL for this problem? I will invoke the sql code in my
java code.
Thanks.
YOU CAN'T LEAVE UR HABIT!!!<br />AS WHEN U REMOVE H,A BIT REMAINS<br />WHEN U REMOVE A,BIT STILL REMAINS<br />WHEN U REMOVE B,IT STILL REMAINS