Home » SQL & PL/SQL » SQL & PL/SQL » PLS-00357: Table,View Or Sequence reference 'T1' not allowed in this context (11.1.0.6)
PLS-00357: Table,View Or Sequence reference 'T1' not allowed in this context [message #509819] |
Wed, 01 June 2011 03:52  |
 |
gopieee16
Messages: 28 Registered: May 2011 Location: Chennai
|
Junior Member |

|
|
we want to delete the duplicate rows in the table by passing dynamic values so I created following procedure but i'm facing a error "PLS-00357: Table,View Or Sequence reference 'T1' not allowed in this context" while executing the procedure
CREATE OR REPLACE PROCEDURE test1_parse (p_tablename IN VARCHAR2, pvalue VARCHAR2)
IS
den VARCHAR2(789);
den1 VARCHAR2(789);
den2 VARCHAR2(789);
den3 VARCHAR2(789);
l_c_1 VARCHAR2(23);
l_c_4 VARCHAR2(23);
l_c_2 VARCHAR2(23);
l_c_3 VARCHAR2(23);
sqlquery VARCHAR2(4000);
mytable VARCHAR2(23);
BEGIN
den := substr (pvalue,((instr (pvalue, ',',1,1)+1)),(((instr (pvalue, ',',1,2))) - (((instr (pvalue, ',',1,1)+1)))));
den1 := substr (pvalue,((instr (pvalue, ',',1,2)+1)),(((instr (pvalue, ',',1,3))) - (((instr (pvalue, ',',1,2)+1)))));
den2 := substr (pvalue,((instr (pvalue, ',',1,3)+1)),(((instr (pvalue, ',',1,4))) - (((instr (pvalue, ',',1,3)+1)))));
den3 := substr (pvalue,((instr (pvalue, ',',1,4)+1)),(((instr (pvalue, ',',1,5))) - (((instr (pvalue, ',',1,4)+1)))));
SELECT den INTO l_c_1 FROM dual;
SELECT den1 INTO l_c_2 FROM dual;
SELECT den2 INTO l_c_3 FROM dual;
SELECT den3 INTO l_c_4 FROM dual;
sqlquery := 'delete from ' || p_tablename || ' where ROWID' || ' NOT IN '|| ' ( select MAX (ROWID) from ' || p_tablename || ' where ' || l_c_1 || ' in ( select' || l_c_1 || ' from ' || p_tablename || ' group by ' || l_c_1 || ' having count(*) > 1 ) group by ' || l_c_1 || ')';
EXECUTE IMMEDIATE sqlquery;
END test1_parse;
SQL> execute test1_parse (t1, ',c1,c2,c3,')
BEGIN test1_parse (t1, ',c1,c2,c3,'); END;
*
ERROR at line 1:
ORA-06550: line 1, column 20:
PLS-00357: Table,View Or Sequence reference 'T1' not allowed in this context
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
CM: fixed [code] tags. They are [code] and [/code] not (code)
[Updated on: Wed, 01 June 2011 03:54] by Moderator Report message to a moderator
|
|
|
|
|
Re: PLS-00357: Table,View Or Sequence reference 'T1' not allowed in this context [message #509823 is a reply to message #509819] |
Wed, 01 June 2011 04:02   |
c_stenersen
Messages: 255 Registered: August 2007
|
Senior Member |
|
|
gopieee16 wrote on Wed, 01 June 2011 10:52execute test1_parse (t1, ',c1,c2,c3,')
BEGIN test1_parse (t1, ',c1,c2,c3,'); END;
*
ERROR at line 1:
ORA-06550: line 1, column 20:
PLS-00357: Table,View Or Sequence reference 'T1' not allowed in this context
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
t1 should be 't1' in your procedure call.
|
|
|
|
|
Goto Forum:
Current Time: Sat Aug 30 06:23:11 CDT 2025
|