DB2 ODBC Driver double quotes

If you are migrating your ODBC related code from one database to DB2, you might run into an issue of single quote vs. double quote issue. For example: Your ODBC code might issue a call to a Stored Procedure using double quote as shown below: CALL...

C Table UDF to join flat file with your SQL

Sometimes, it may be necessary to expose data in your flat file with the relational data. There might be some situations where there is no option to load that data in a table. But still, you need a way to use this flat file data in your SQL statements. DB2 provides...

Julian day in DB2

DB2 provides a way to calculate date from a Julian day. For example: 2008075 should match to the 75th day of 2008 and i.e. 2008-03-15. If you try to do, $ db2 values date(2008075) You will get a date of 12/03/5498 but that is what you do not want. The argument to DATE...

How to create Explain Plan of DB2 Stored Procedures?

Step-1 : Create Explain tables See this entry http://www.db2ude.com/?q=node/65 for how to create explain tables in DB2. Please note: You need to create explain tables in the USER-ID of the logged-in user. If you created explain plans in the schema name of some userid,...