After a long time …

It has been almost a year since my last post. So many things have happened these days. My laptop OS (Ubuntu) got corrupted (so many things lost). That could be also be one of the reasons I didn’t blog. On my personal side, I got married.

Anyway, nowadays, I am working in Netezza database. Not much technically; it is just a plain old SQL queries; not even stored procedures. Apart from Netezza, I learn some other stuff like a bit of Cognos, a bit of Control-M, a bit of Agile, etc. and these things make me not too bored of my work.

Now, I’d like to add a minimum technical value to this post.

In Netezza, unlike Oracle or PostgreSQL, we can refer to the computed columns at the same level of the SELECT/FROM clause.

For e.g. in Netezza:


select date'2015-05-11' as dt, dt + 1 as dt2;

The same code, in Oracle, should be written as:


select dt, dt + 1 as dt2 from (select date'2015-05-11' as dt from dual);

This feature can be helpful some times. Happy Programming!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s