Home » SQL & PL/SQL » SQL & PL/SQL » hi guys help me out for these problem on procedures
hi guys help me out for these problem on procedures [message #225171] Sun, 18 March 2007 15:00 Go to next message
deshikiran
Messages: 3
Registered: March 2007
Location: hyderabad
Junior Member
Hi friends,

i have some problem with below procedure , help me out.

SQL> ed
Wrote file afiedt.buf

1 create or replace procedure exp
2 as
3 cursor c1 is select dept from dept3;
4 l_file UTL_FILE.FILE_TYPE;
5 BEGIN
6 l_file := UTL_FILE.fopen('c:\', Sample2.txt, 'w');
7 for c2 in c1
8 loop
9 UTL_FILE.PUT_LINE(l_file,c2.dept);
10 end loop;
11 UTL_FILE.FCLOSE(l_file);
12* END exp;
SQL> /

Warning: Procedure created with compilation errors.

SQL> exec exp
BEGIN exp; END;

*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'EXP'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Re: hi guys help me out for these problem on procedures [message #225172 is a reply to message #225171] Sun, 18 March 2007 15:05 Go to previous messageGo to next message
michael_bialik
Messages: 611
Registered: July 2006
Senior Member
1. Change the name of your proc to some name which is NOT a reserved word.

2. Line 6:
l_file := UTL_FILE.fopen('c:\', 'Sample2.txt', 'w');

HTH.

Michael
Re: hi guys help me out for these problem on procedures [message #225173 is a reply to message #225171] Sun, 18 March 2007 15:07 Go to previous message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
Get code to compile cleanly (no errors) before trying to run it.
Previous Topic: how to set the UTL_FILE directory intialization in INIT.ORA in windows
Next Topic: RE: Cursor variable output
Goto Forum:
  


Current Time: Sat Dec 10 10:45:36 CST 2016

Total time taken to generate the page: 0.08371 seconds