cuetzpalin
Programmer
Hi,
I need help in putting together a script that will query a client table and spool the results after each unique client ID. The spool data will need a trailer and a header. I understand how to write a simple sql query and how to spool data but I don't know how to code for this situation. I imagine I need to use pl/sql and a loop.
Here's an example of what I need:
Table A
--------
Client ID Client Name
--------- -----------
1 John
2 Ray
3 Mary
I need to select * records from Table A and spool the data with a header and trailer for each client ID.
So the output should look ike this:
Header
1 John
Trailer
Header
2 Ray
Trailer
Header
3 Mary
Trailer
Thanks for your help!
- Johnny
I need help in putting together a script that will query a client table and spool the results after each unique client ID. The spool data will need a trailer and a header. I understand how to write a simple sql query and how to spool data but I don't know how to code for this situation. I imagine I need to use pl/sql and a loop.
Here's an example of what I need:
Table A
--------
Client ID Client Name
--------- -----------
1 John
2 Ray
3 Mary
I need to select * records from Table A and spool the data with a header and trailer for each client ID.
So the output should look ike this:
Header
1 John
Trailer
Header
2 Ray
Trailer
Header
3 Mary
Trailer
Thanks for your help!
- Johnny