Multiple Select Statements in One Open Script
<p>Hi,</p>
<p> </p>
<p>I am new to BIRT and I am wondering if there is a way to do multiple select statements in one open script?</p>
<p> </p>
<p>For example I want the following select statements in the one open script.</p>
<p> </p>
<div>
<pre class="_prettyXprint">
select workorder.wonum, workorder.description, workorder.worktype, workorder.location, workorder.pluspcustomer,
labtrans.refwo, labtrans.startdate, labtrans.starttime, labtrans.finishtime, labtrans.regularhrs, labtrans.plusplineprice, labtrans.laborcode, labtrans.linecost as labline,
locations.location as loclocation, locations.description as locdesc,
po.ponum, po.status, po.totalcost, po.totaltax1, po.receipts, po.vendor, (po.totalcost-po.totaltax1) as pretaxtotal,
poline.ponum, poline.polinenum, poline.description as polinedesc, poline.orderqty, poline.unitcost as polincost, poline.linecost, poline.receivedqty,
person.displayname,
pluspcustomer.name
from workorder
left join labtrans on labtrans.refwo=workorder.wonum and labtrans.siteid=workorder.siteid
left outer join locations on locations.location = workorder.location and locations.siteid=workorder.siteid
left join maximo.po on workorder.wonum=po.hflwonum and workorder.siteid=po.siteid and workorder.orgid=po.orgid
left join poline on po.ponum=poline.ponum
left outer join person on personid in (select personid from labor where laborcode = labtrans.laborcode)
left outer join pluspcustomer on pluspcustomer.customer=workorder.pluspcustomer
where (workorder.wonum='10192')
;
select workorder.wonum,
matusetrans.linetype description as matdesc, matusetrans.quantity, matusetrans.unitcost, matusetrans.linecost as matlincost2, matusetrans.plusplineprice as matlinprice
from workorder
left join maximo.matusetrans on workorder.wonum=matusetrans.refwo and workorder.siteid=matusetrans.tositeid and linetype not in (select value from synonymdomain where domainid='LINETYPE' and maxvalue='TOOL')
where (workorder.wonum='10192')
;
select workorder.wonum,
worklog.createby, worklog.description as logdesc, worklog.createdate,
longdescription.ldtext
from workorder
left join worklog on workorder.wonum = worklog.recordkey and workorder.woclass = worklog.class and workorder.siteid = worklog.siteid
left join longdescription on worklog.worklogid = longdescription.ldkey
where (workorder.wonum='10192') and ldownertable = 'WORKLOG'
;
</pre>
</div>
<p> </p>
<p> </p>