DB2

Difference in number of days using DB2 days function

Difference in number of day using DB2 days function DAYS – This returns the number of days starting from date ‘0001-01-01’.  SELECT DAYS(‘2010-10-31’) FROM SYSIBM.SYSDUMMY1 This will query will return 734076. If you wish to calculate difference in number of days between two dates then the following query can be used SELECT DAYS(‘2010-10-31’)-DAYS(‘1990-10-01’) FROM SYSIBM.SYSDUMMY1 This […]

Difference in number of days using DB2 days function Read More »

What is a db2 package?

What is a package? A package is a single, bound DBRM which contains optimized access paths to DB2.  Packages are the ouput of “Bind Package” command which takes DBRM as input. There can be one DBRM per package.  Once the package is formed using the DBRM it can be fed to the “Bind Plan” command

What is a db2 package? Read More »