Thanks guys! I think PostGres has a much better way of doing this. You just append a clause to the end of the SQL - "returning the desired value" and that's what comes back. What you guys are sharing must be a closely guarded secret because it sure is hard to find. Again thanks!
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!