Home » RDBMS Server » Server Administration » Try this "Query problem"
Try this "Query problem" [message #374320] Tue, 05 June 2001 11:30
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
Previous Topic: Try this "Query problem"
Next Topic: Try this "Query problem"
Goto Forum:
  


Current Time: Fri Jul 05 15:41:52 CDT 2024