Hello,
I would like to create a query from a single table with the following columns.
SEQNO is a unique key
Name ID Amount Date JOBID SEQNO
Mark 9 200 1/2/09 1001 1
Peter 3 300 1/2/09 1001 2
Steve 1 200 2/2/09 1001 3
Mark 9 200 3/2/09 1001 4
Peter 3 300 4/2/09 1001 5
Steve 1 200 5/2/09 1001 6
Hally 1 200 5/2/09 1002 7
The query should output in this format by SUBJOBID and a date range:-
**NAME ID 1/2 2/2 3/2 4/2 5/2 JOBID**<br>
Mark 9 200 NULL 200 NULL NULL 1001
Peter 3 300 NULL NULL 300 NULL 1001
Steve 1 NULL 200 NULL NULL 200 1001
I have been going over pivot queries for this. But I don't seem to get anywhere. Could some one help ?