Changing a Ingres report to an Oracle report.
775314Jul 6 2010 — edited Jul 6 2010Hi!
I need to convert an ingres script so that it works in 0racle(PL/SQL) in Oracle 10g database. It is about printing a report from database in a certain form.
I can manage the printing in PL/SQL, but formatting the output is what puzzles me.
The Ingres script goes like this:
.NAME foreigners
.QUERY
SELECT h.id, n.state
FROM popperson h, popnationality n
WHERE n.state > 3 and (n.state < 246 or n.state > 246)
and h.registerstate=1 and h.id=n.poppersonid
.SORT state
.OUTPUT foreigners.txt
.header report
.print " Foreigners in town"
.nl
.nl
.FOOTER state
.print "landcode" .t+2
.print state(i3) .t+6
.print count(id)(i5) .nl
.FOOTER report
.nl
.print "City alltogether "
.print count(id)(i5) .nl
The output is like:
Foreigners in town
landcode 4 345
landcode 8 3
landcode 12 12
etc ...
City alltogether 5299
Thanks! OV