Hi db2newb,
in DB2, the pagesize is being determined when you create a tablespace, default is 4 KB.
I can't make much sense out of LINESIZE, but if it is the maximum size a record can have in Oracle, there is no corresponding parameter in DB2. The largest row size in DB2 just needs to fit into a page. Exceptions may apply to LOB types, but anyway I don't know how DB2 stores them internally.
About FEEDBACK,VERIFY,UNDERLINE I don't know anything.
You can derive this month's first day using this expression:
values ( current date - ( day( current date ) - 1 ) days )
And the last day of this month is:
values ( current date - ( day( current date) ) days + 1 months )
You can define UDFs to emulate date functions you had in Oracle. In DB2 formatting data types for output is considered a client application business. But I believe you can play around with client language settings too. Or use the functions timestamp_format or timestamp_iso.
Can you tell us what you mean by spooling?
Johann
Quote:
Originally posted by db2newb
Hi I'm a DB2 newb, company IT dept decided to upgrade to DB2 from Oracle on system I work on thus a lot of stuff I created have to be converted as fast as I can work on it, been reading on the SQL cookbook and a lot of online stuff and bought SQL99 bible but I still have a few quick questions on stuff that I need to convert from Oracle to DB2:
whats the DB2 equivalent of:
1. SET PAGESIZE,LINESIZE,FEEDBACK,VERIFY,UNDERLINE
or any other formatting function in oracle.
2. Is there a FirstDay, Lastday function in DB2, if I want to get the first day of this month and the last day of this month in date format what would I use?
3. Is there any other function to spool in DB2 that instead of appending to the output file it overwrites it? The best way I know right now is delete the output file before running the query that produces it again.
Some more info. I can only use DB2 connect to connect to our db2 servers and I usually create script files that produces outputs in csv, txt, etc. etc. format. I've been working with Oracle for years and am just jumping in to DB2 so other than the usual SQL I'm not familiar yet with a lot of DB2 stuff.
Advance Thanks for any help.
|