Multiple selects in ISQL
Posted in 2004
I'm writing a report where in I need a set of sub-totals. The only
way I know how to get there is with multiple selects, in ISQL, but
apparently they're not flying. I have this above the format section
and its not working:
select ms_case_number, pa_cp_py_code, pa_prechk_date,
pa_amt_paid from flmastfile, flmastpymt
where ms_cgn = pa_cgn
and pa_prechk_date between $bdate and $edate
order by pa_prechk_date, pa_cp_py_code
end
select sum(pa_amt_paid) docsum
where pa_cp_py_code = "DOC"
and pa_prechk_date between $bdate and $edate
end
select sum(pa_amt_paid) possum
where pa_cp_py_code = "POS"
and pa_prechk_date between $bdate and $edate
end
select sum(pa_amt_paid) dlqsum
where pa_cp_py_code = "DLQ"
and pa_prechk_date between $bdate and $edate
end
select sum(pa_amt_paid) trusum
where pa_cp_py_code = "TRQ"
and pa_prechk_date between $bdate and $edate
end
Any suggestions on how to get this to run?
Thanks in advance!