Try this "Query problem" [message #374319] |
Tue, 05 June 2001 11:26 |
bosou
Messages: 3 Registered: June 2001
|
Junior Member |
|
|
I am a newbie sql script writer. Have this problem.
I have a table with the following redundant records:
-------------------------------------------------------
ID Posn Eff_Date Job_Type
---------------------------------------------------
123456 posn001 01-JAN-2001 Primary
123456 posn002 02-MAR-2001 Secondary
123456 posn003 24-MAR-2001 Secondary
123456 posn007 03-MAY-2001 Secondary
231234 posn007 01-APR-2001 Primary
909090 posn004 19-JAN-2001 Primary
909090 posn007 22-APR-2001 Secondary
-------------------------------------------------------
Question: How do I write an SQL script so that it pulls data to make a one line record per employee? Example rpt format:
ID Posn1 Posn2 Posn3 Posn4
-------------------------------------------------------
123456 posn001 posn002 posn003 posn007
231234 posn007 NULL NULL NULL
909090 posn004 posn007 NULL NULL
-------------------------------------------------------
You can email me the script.
Thanks.
bosou
|
|
|