Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: I need to test whether I am getting a result back from a query is it possible?

Re: I need to test whether I am getting a result back from a query is it possible?

From: tony <ramdan_at_mailexcite.com>
Date: 30 Sep 1999 12:48:05 -0500
Message-ID: <CmNI3.14388$q8.473394@newscene.newscene.com>

But how do i determine that no row is returned from the query. I am not getting a NULL back. For example

SELECT DECODE(D2_HOLIDAY, NULL , 'x', 'a' ) FROM D2_HOLIDAYS WHERE D2_HOLIDAY = 'cccchristmas_evee'

returns nothing (not a null) when the match does not work)

How do I test what came back, since null doesn't work

In article <7t00iu$gmn$1_at_newsmaster.pathcom.com>, "John Chiu" <johnc_at_relsol.com> wrote:
>Yes, because there is no row returned from the query.
>
>John Chiu
>
>
>tony wrote in message ...
>>I need to determine if I get a value back from a query, it there is a value
>I
>>use it, otherwise I want to put a string value. I tried
>>
>>decode(A.SUPPLIER, NULL, 'NFP', A.SUPPLIER)
>>
>>and
>>
>>nvl(A.SUPPLIER, 'NFP')
>>
>>but I get no results back.
>>
>>is that because when there is no data I don't really get a null? what can I
>>look for to do this
>
>
Received on Thu Sep 30 1999 - 12:48:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US