You can use a CASE expression to do such queries. If you can post an exact
repro illustrating your requirements clearly someone here can show you how.
In certain cases you will have to use IF ...ELSE constructs depending on
what you are doing.
( Please reply to newsgroups only )