Re: EXception no_DATA_FOUND
From: Pete Kolton <peter.kolton_at_nspmbtinternet.com>
Date: Thu, 25 Nov 1999 12:33:08 -0000
Message-ID: <81ja5s$emf$1_at_supernews.com>
Date: Thu, 25 Nov 1999 12:33:08 -0000
Message-ID: <81ja5s$emf$1_at_supernews.com>
You don't get no_data_found because you are not trying to return any data. The select statement is succeeding and returns the value 0 into the tablenum variable.
-- ======================================================== Pete Kolton ORACLE Systems Consultant All reasonable offers considered :-) Pete_at_kolton.com http://www.kolton.com ======================================================== sachh wrote in message <81kbvr$7ff$1_at_news.vsnl.net.in>...Received on Thu Nov 25 1999 - 13:33:08 CET
>I am not getting the exception
>no_data_found while using the following procedure
>eventhough the user sott dowsnt exists;
>where can be the problem??
>
>declare
>tablenum integer;
>status integer;
>begin
>select count(*) into tablenum from all_tables where owner='SOTT';
>if sql%rowcount=0 then dbms_output.put_line('no tables');
>end if;
>exception
>when no_data_found then
>status:=sqlcode;
>dbms_output.put_line('following '|| sqlerrm(status));
>end;
>/
>
>