The OP's problem was specific to Oracle and as such, he should use the DB facilities that available. While on the surface, the below solution looks elegant, from an Oracle performance perspective, it is horrific. By building the SQL statement dynamically in this manner, statement reuse is almost assuredly eliminated. It is better (IMHO) to use the DB facilities available (in this case Oracle's NVL() or DECODE() functions) than to try to write something that will be portable across all RDBMSs.Acutally, I was looking for a perl solution since it really wasnt an Oracle problem to begin with, but a perl issue that Brian described a little better than me. Which, btw, I like your solution Brian, and that is exactly the perl solution I was looking for.
-----------------
Ron Reidy
Senior DBA
Array BioPharma, Inc.
Thanks again for all your help.
Chris
-- ------------------------------- Just Your Friendly Neighborhood _SPIDEY_
-----------------------------------------
The information contained in this message may be privileged, confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or any employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.
Thank you. Paychex, Inc.
