How do I create a PeopleSoft Query to place a sub-query in the selected column?
For example, how do I convert the followign SQL into PS Query?
select a.business_unit, a.voucher_id, b.voucher_line_num, sum(a.saletx_amt), sum(b.saletx_calc_amt) (select sum(bb.saletx_calc_amt) from ps_voucher_line bb where bb.business_unit = a.business_unit and bb.voucher_id = a.voucher_id) Sum_Calc_Sales_Tax_AllLines, sum(a.saletx_amt) - (select sum(bbb.SALETX_CALC_AMT) from ps_voucher_line bbb where bbb.business_unit = a.business_unit and bbb.voucher_id = a.voucher_id) Over_Under_STX_PYMT, from ps_voucher a, ps_voucher_line b where a.business_unit = '7012' and a.voucher_id = '01677751' and b.business_unit = a.business_unit and b.voucher_id = a.voucher_id group by a.business_unit,a.voucher_id,b.voucher_line_num having sum(a.saletx_amt) <> (select sum(bbb.saletx_calc_amt) from ps_voucher_line bbb where bbb.business_unit = a.business_unit and bbb.voucher_id = a.voucher_id) order by 1,2,3;