Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

spooling records in order

Status
Not open for further replies.

cuetzpalin

Programmer
Jun 5, 2002
99
0
0
US
Hi,

I created a table based of another dataset and added a field that is a sequence number for each record.

The spool file should spool all the fields in a record on one line....basically concatenating all fields...

For example

0001 John Does 02/10/10
0002 Jane Doe 03/10/10
0003 Jack Box 01/01/10

I'm able to spool the file however it's not spooling in sequential order..

it's spooling like this...
0002 Jane Doe 03/10/10
0001 John Does 02/10/10
0003 Jack Box 01/01/10

How do I force it to spool the table as is? when I do a select * it diplays the records in the correct sequence.

Thanks in advance...

- John
 
The select statement which you are using to generate the records must include an ORDER BY statement to ensure the order you want.

In this case order by the sequence number.

Regards

T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top