View previous topic :: View next topic
|
Author |
Message |
CHANDAN KAPOOR
New User
Joined: 12 Apr 2008 Posts: 36 Location: NOIDA
|
|
|
|
Hi ,
I have requirement like in the below query.
SELECT MAX(ACDFCPNN) FROM TE.UTE01011_ACFTDEFCT
WHERE ACFTABB = WS_ACFTABB
INTO :WS_ACDFCPNN;
I tried to run this query in QMF when the value passed in WS_ACFTABB is not available in table then the query is returning Null value as '-' .
Now then I have rquirement to move Zero to the host variable WS_ACDFCPNN when the query returns null value ie '-'.
Can somebody assist that how to handle this.
Thanks,
Chandan Kapoor |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hello Chandan,
Please try below query:
Code: |
SELECT COALESCE(MAX(ACDFCPNN),0) FROM TE.UTE01011_ACFTDEFCT
WHERE ACFTABB = WS_ACFTABB
INTO :WS_ACDFCPNN; |
|
|
Back to top |
|
|
CHANDAN KAPOOR
New User
Joined: 12 Apr 2008 Posts: 36 Location: NOIDA
|
|
|
|
Thanks , Ekta for your quick reply. |
|
Back to top |
|
|
tamal_babu
New User
Joined: 06 Feb 2006 Posts: 17 Location: Kolkata
|
|
|
|
u can use VALUE function as well... |
|
Back to top |
|
|
|