Quote:
Originally posted by treddy123
Hello All:
I am new to DB2, but have ample exp. in oracle. Now I have to write sql statements to generate reports similar to sqlplus in oracle.
in oracle we have so many options to format a report.
like
col name_of_the_field format a40 justify l (to display data in the leftside of the column)
set pagesize 100 (to set the no of lines in each page )
set linesize 100 (each linesize 100)
so can someone give me pointer to look for the formating syntax in db2.
The report generated by DB2 and Oracle has to similar.
|
You are out of luck. DB2 command line processor does not have formatting capabilities of SQLplus. The best you can do is to turn off headings and various messages to output bare data and then format them using OS tools (if you're on *nix).
Alternatively, you can use 3d party report software (e.g. Crystal Reports) or even MS Excel to format your output.