I have 2 tables
one containing headers (ahasnf00)
the other containing detail (adasnf00)
I need to purge both, but cannot work out how to purge the detail table.
The connection between the 2 tables is shipment number
as in the following SQL
select b.AD00_SHIPMENT_NBR
from ahasnf00 a, adasnf00 b
where a.AH00_VERIFIED_DATE like '%&DATE'
and
a.AH00_STATUS_CODE >= '50'
and
a.AH00_SHIPMENT_NBR=b.AD00_SHIPMENT_NBR
/
This works OK and gives me the correct numbers, but how do I
a) insert these records into another table
b) delete thenm from the detail table
Alex
one containing headers (ahasnf00)
the other containing detail (adasnf00)
I need to purge both, but cannot work out how to purge the detail table.
The connection between the 2 tables is shipment number
as in the following SQL
select b.AD00_SHIPMENT_NBR
from ahasnf00 a, adasnf00 b
where a.AH00_VERIFIED_DATE like '%&DATE'
and
a.AH00_STATUS_CODE >= '50'
and
a.AH00_SHIPMENT_NBR=b.AD00_SHIPMENT_NBR
/
This works OK and gives me the correct numbers, but how do I
a) insert these records into another table
b) delete thenm from the detail table
Alex