5 pts.
 AS400 Qry – Is there a way to trick qry into treating blanks as null?
The data I need to sort on is in either field A or B depending on the transaction type. It could be accomplished by using the "value" expression if qry would consider a blank field as null. Any ideas?

Software/Hardware used:
ASKED: April 23, 2008  7:42 PM
UPDATED: April 20, 2010  5:57 AM

Answer Wiki:
Hello, This website may be able to help you in your Query... http://www.itjungle.com/mpo/mpo060503-story01.html TPinky One way to do this is a CASE expression. Beware: not a CASE <i>statement </i>but a CASE <i>expression</i>. You might have to write it in the ORDER BY clause.
Last Wiki Answer Submitted:  June 6, 2008  4:56 pm  by  Tpinky   4,165 pts.
All Answer Wiki Contributors:  Tpinky   4,165 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi,

Afraid you can’t use CASE in Query.

Regards,

Martin Gilbert.

 23,625 pts.

 

AS/400 queries aren’t limited to the Query/400 product. SQL queries are also possible and CASE works fine with them. Or queries might be executed through various APIs and essentially all HLLs.

If the question doesn’t specify that a particular method of query is required, then any answer is valid.

Tom

 110,135 pts.