Tag Archives: sql

first and last day of the month

Here is a quick way to find the first and last day of the month : with temp1 (first_day_of_month,last_day_of_month) as (values ((current date – day(current date + 1 month) days) + 1 DAY,  (current date + 1 month) – day(current … Continue reading

Posted in db2 | Tagged , , , , | Leave a comment

Extracting Siebel ETL timings

For a long time, I relied on my siebel admins to get Siebel ETL timings and often struggled to get certain information. Last week, I realized why bother when all the info are available on DB2 tables. This sql gives … Continue reading

Posted in Applications, db2 | Tagged , , , , , , , , | Leave a comment

I know stage 1 and stage 2 predicate…whats stage 3 and 4 ??

When tuning a SQL, one of the things a DBA looks at is to see whether the predicate in the SQL is stage 1 or stage 2. So what is stage 1 and stage 2. Basically when DB2 optimizer evaluates … Continue reading

Posted in db2 | Tagged , , , , , , , , , , , , | Leave a comment

DB2 Command Line Processing

Yesterday,  I had posted about db2batch. One of my blog reader who was pretty new DB2 asked me how to run a set of sql from a file. Thats when I realized my blog doesn’t cover newbies, so thought I … Continue reading

Posted in db2 | Tagged , , , , , , , , | Leave a comment