Question

  Asked: Apr 23 2008   7:42 PM GMT
  Asked by: Sands


AS400 Qry - Is there a way to trick qry into treating blanks as null?


AS/400, QRY, Query

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?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



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 statement but a CASE expression.
You might have to write it in the ORDER BY clause.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400 and Development.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Gilly400  |   Jun 9 2008  2:00PM GMT

Hi,

Afraid you can’t use CASE in Query.

Regards,

Martin Gilbert.