Can do it in SQL PLUS but not in PL/SQL [message #1185] |
Tue, 09 April 2002 11:13 |
Steve B
Messages: 1 Registered: April 2002
|
Junior Member |
|
|
I have the following code which works in native SQL PLUS but which return an error (PLS-00103: Encountered the symbol "(" when expecting one of the following:
begin declare etc)
INSERT INTO scsen (fk_usstr_state_trtry_cd, us_state_anl_state_entlmnt_amt)
(SELECT DISTINCT scsme_state_cd,0
FROM scsme, scsen
WHERE
(select count(fk_usstr_state_trtry_cd)
FROM scsen,scsme
WHERE scsme.scsme_state_cd = scsen.fk_usstr_state_trtry_cd) =0 );
Is there a limit in the number of nested select where's in PL/SQL that there is not in SQL PLUS.
Thanks
|
|
|
Re: Can do it in SQL PLUS but not in PL/SQL [message #1192 is a reply to message #1185] |
Wed, 10 April 2002 06:39 |
|
Mahesh Rajendran
Messages: 10707 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
you cannot issue this kind of sql statemetn in plsql.
use a cursor or
somemthing like this.
declare
var1
var2
..
begin
select ..... into var1,var2.... from scsen,sccme...
insert into scsen values( var1,var2....)
|
|
|