SQL LanguageSQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
The cool thing about that statement is that it IS ANSO/ISO SQL 92 compliant! In other words, it should work in other RDBMS's as long as they are also compliant to the same level, 'pgtips' has used no proprietary code.
Glad you like it Owain. I can't take credit though, my solution to the original problem (of which this is just a variation) used a SQL UDF. Jeff Mason changed it to the CASE version.