I have a problem where I'd like to read a table based on some
selection criteria. If certain conditions are met in the data
retrieved I'd like to read the table again selecting new records.
For example:
I read a transaction file by date range. As I read each record if a
certain field contains values I return to the transaction table and
read it again using these values as my search criteria.
select date, description, amount, order_id as order from table_x
where date >= june 1 2005 and date <= june 30 2005
If table_x.order <NULL
select date, description, amount from table_x where
table_x.order_id = order and (date < june 1 2005 or date june 30
2005)
I then want to total all the amount columns.
Anyone have any idea how I can do this?
Thanks
Rich McClure
Yahoo! Groups Links
<*To visit your group on the web, go to:
<*To unsubscribe from this group, send an email to:
@yahoogroups.com
<*Your use of Yahoo! Groups is subject to: