SOS -- >1 sql select statements in 1 report - HOW
HELP !! - I have this SQL script BUT it only prints out results of first select statement .
Do I need to adjust the SQL code to get the expected 3 'batches ' of results .
Code listed below :
select partnum apart, drawissno arev
into #a
from allpartmaster
--Works Order
select id, partid, status, duedate, partrevisionid 'Order Rev', arev 'Live Rev'
from worksorders, #a
where partid = apart
and status in ('NEW','ACTIVE')
and arev <> partrevisionid
--Sales Orders
select orderid, itemnumber, duedate, partid, partrevisionid 'Order Rev', arev 'Live Rev'
from orderitems, #a
where partid = apart
and ordertype = 'SO'
and status in ('NEW','ACTIVE')
and arev <> partrevisionid
-- Stock Batches
select partid, warehouseid, locationid, quantity, batchnumber, receiveddate, partrevisionid 'Order Rev', arev 'Live Rev'
from stockbatches, #a
where partid = apart
and quantity > 0
and arev <> partrevisionid
--Stock Allocations
select partid, quantity, source, worksorderid, partrevisionid 'Order Rev', arev 'Live Rev'
from stockallocations, #a
where partid = apart
and issatisfied = 0
and quantity > 0
and arev <> partrevisionid
thanks