[thelist] can i merge columns in an Oracle query?

Luther, Ron Ron.Luther at hp.com
Mon Mar 15 08:11:46 CDT 2010

The Rudymiester noted:

>>NVL will do the job (nice one, Ron), but COALESCE will, too
>>COALESCE is standard SQL, and can also handle more than two parameters

Hi Rudy,

Really?  That would be cool.  And it would certainly be more elegant than nested NVLs!  But I always thought COALESCE was the MSSQL command for doing this.  It didn't used to work in Oracle.  Hmmm.  I don't see it listed in my "Oracle - The Complete Reference" volume.  

Aha!  Well whaddaya know?  I see it listed online as working for Oracle versions 9i, 10g, and 11g.  What the hey?  Oh crap!  Looks like my dead tree reference book is woefully out of date.  <checks date /> Goodness!  Copyright 1997.  Covers up to Oracle version 7.3!  Ooopsie!

>>by the way, i thought oracle doesn't like the AS keyword...

Always worked okay for me ... and it _is_ listed in my [antique] Oracle reference book.  Oh dear, do you think maybe the command is now deprecated?

Mumble mumble ... Hey you kids! Get off my lawn!

More information about the thelist mailing list