-
PLS-00302: component 'TESTA'' must be declared
Hi,
I am trying to create below stored procedure, but i am encountering error as
LINE/ COL ERROR
-------- ----------------------------------------------------
14/ 7 PL/SQL: Statement ignored
14/ 39 PLS-00302: component 'TestA ' must be declared
could you please assist on this
Create or replace procedure TestProc
as
BEGIN
DECLARE
v_file utl_file.file_type;
v_logfile VARCHAR2(100);
v_header varchar2(100);
BEGIN
v_logfile := 'TESTFILE_'||TO_CHAR(SYSDATE,'YYYYMMDDHH24MISS')||'.csv';
v_file := UTL_FILE.FOPEN('TEMP_DIR', v_logfile, 'w');
--v_header :='TestA, '||' TestB';
--UTL_FILE.PUT_LINE(v_file,v_header);
FOR e_rec IN (SELECT * FROM Test_Table) LOOP
UTL_FILE.PUT_LINE(v_file, e_rec.TestA ||','|| e_rec.TestB);
END LOOP;
UTL_FILE.FCLOSE(v_file);
END;
END;
-
Please create/populate a cursor based on Test_Table then loop on the cursor to print the results.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
 Originally Posted by Jyo
Hi,
I am trying to create . . . E t c . . .
14/ 39 PLS-00302: component 'TestA ' must be declared
could you please assist on this . . .
The source of this error can generally be found between the chair and the keyboard.
As the Italians would say, perhaps it's just "Mala testa".
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|