Question Regarding Select Into

From: OracleNewbie <rhythmram_at_gmail.com>
Date: 22 Dec 2005 14:19:32 -0800
Message-ID: <1135289972.387015.147470_at_o13g2000cwo.googlegroups.com>



Oracle Gurus,

DECLARE
  A VARCHAR2 (30 BYTE);
BEGIN
A := '';

SELECT FIELDNAME INTO A
  FROM EXCELTABLEDEF
 WHERE ROWNUM = 1 AND CST = 'RP_DAT' ';
 DBMS_OUTPUT.PUT_LINE (A);
END; [Quoted] [Quoted] The above works fine if it finds a record. If there is no record then it throws up the following error
ORA-01403: no data found
[Quoted] ORA-06512: at line 6

I can have the exception to handle it. But, is there a way where i can have some value if it doesn't return anything like ISNULL(A, 'TBLS')

[Quoted] Again, ppl i'm new and my question might too simple or ultimate stupidity. If you know and can guide me do post else dont post some crap like what one of the guy "Frank" in this group do. He thinks he is an Big **le in Oracle. Received on Thu Dec 22 2005 - 23:19:32 CET

Original text of this message