getting a no_data_found _error in UTL_FILE

getting a no_data_found _error in UTL_FILE

 

  

hi
i have a procedure in which i am reading a text flat file line by line using UTL_FILE.
the file got 10 line. problem is that when the line is completed i am geting a error of NO_DATA_FOUND error or it goes to infinite loop.
i am reading one line at one time and process it then fetch another.
my procedure is like that:
create or replace procedure a(file_name varchar2,file_path varchar2)is
file_document UTL_FILE.FILE_TYPE;
file_path varchar2(75) := directory;
file_name varchar2(50) := filename;
file_mode char(1) := 'R';

Buffer varchar2(100);
Begin

-- open the input-file

file_document := UTL_FILE.FOPEN(file_Path, file_Name, file_mode);
begin
loop
-- reading records from the file
UTL_FILE.GET_LINE(file_document, Buffer);

-----
end loop;
end;
UTL_FILE.FCLOSE(file_document);

exception
-- --

end;
-----Original Message-----
From: Chris Hagemaier
[mailto:oracledba-ezmlmshield-x88187791.[Email address protected]
Sent: Wednesday, October 06, 2004 12:22 AM
To: LazyDBA Discussion
Subject: RE: sqlplus


Brian-
Group by... will still work even you you don't sum() or avg() etc.

If need be, you can do this

SELECT SYS.DBA_ROLE_PRIVS.GRANTEE ||
SYS.DBA_ROLE_PRIVS.GRANTED_ROLE Grantee_Role,
SYS.DBA_ROLE_PRIVS.ADMIN_OPTION,
SYS.DBA_TAB_PRIVS.OWNER,
SYS.DBA_TAB_PRIVS.TABLE_NAME,
SYS.DBA_TAB_PRIVS.PRIVILEGE,
SYS.DBA_TAB_PRIVS.GRANTABLE,
SYS.DBA_ROLE_PRIVS.DEFAULT_ROLE
FROM SYS.DBA_ROLE_PRIVS, SYS.DBA_TAB_PRIVS
WHERE SYS.DBA_ROLE_PRIVS.GRANTEE<>'APPS'
AND
SYS.DBA_ROLE_PRIVS.GRANTED_ROLE=SYS.DBA_TAB_PRIVS.GRANTEE
group by SYS.DBA_ROLE_PRIVS.GRANTEE ||
SYS.DBA_ROLE_PRIVS.GRANTED_ROLE;

-----Original Message-----
From: Zelli Brian
[mailto:oracledba-ezmlmshield-x75934419.[Email address protected]
Sent: Tuesday, October 05, 2004 11:32 AM
To: LazyDBA Discussion
Subject: sqlplus


Hello all,
Ok, I am going crazy over trying to make this work and I've looked thru
all the docs I have. I can group on totals but how do you group on alpha
columns? I've tried everything including rollup and grouping sets.

Code:

SELECT ALL SYS.DBA_ROLE_PRIVS.GRANTEE,
SYS.DBA_ROLE_PRIVS.GRANTED_ROLE,
SYS.DBA_ROLE_PRIVS.ADMIN_OPTION,
SYS.DBA_TAB_PRIVS.OWNER,
SYS.DBA_TAB_PRIVS.TABLE_NAME,
SYS.DBA_TAB_PRIVS.PRIVILEGE,
SYS.DBA_TAB_PRIVS.GRANTABLE,
SYS.DBA_ROLE_PRIVS.DEFAULT_ROLE
FROM SYS.DBA_ROLE_PRIVS, SYS.DBA_TAB_PRIVS
WHERE SYS.DBA_ROLE_PRIVS.GRANTEE<>'APPS'
AND
SYS.DBA_ROLE_PRIVS.GRANTED_ROLE=SYS.DBA_TAB_PRIVS.GRANTEE;


I want the grantee and granted_role to only show up once. It is for
auditing.

3rd Party tools can produce the results but straight sql can't. HELP!!!!

ciao,
Brian



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html


--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

Douglas County, Oregon
www.co.douglas.or.us



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html


Oracle LazyDBA home page