Hi everyone. I've done this before with a Cursor, but wonder if there is a straightforward way to do it using SQL set operations (no cursor).
I have the following 3 fields withing the same table:
ACCT ARRIVE DEPART
Account is numeric, arrive and depart are dates. I'd like to create a record in a new table for each day of the trip. For example, if #123 arrived on the 4th and left on the 6th I'd like to add the following 3 records to the new table:
ACCT DATE
123 4/4/03
123 4/5/03
123 4/6/03
Any straight SQL that would accomplish this sans cursor? Thanks.
I have the following 3 fields withing the same table:
ACCT ARRIVE DEPART
Account is numeric, arrive and depart are dates. I'd like to create a record in a new table for each day of the trip. For example, if #123 arrived on the 4th and left on the 6th I'd like to add the following 3 records to the new table:
ACCT DATE
123 4/4/03
123 4/5/03
123 4/6/03
Any straight SQL that would accomplish this sans cursor? Thanks.