Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set serveroutput on;
- CREATE or replace DIRECTORY USER_DIR AS '/home/barracuda';
- GRANT READ ON DIRECTORY USER_DIR TO PUBLIC;
- DECLARE
- V1 VARCHAR2(200); --32767
- F1 UTL_FILE.FILE_TYPE;
- BEGIN
- F1 := UTL_FILE.FOPEN('USER_DIR','TRAVEL_07222015.dat','R');
- Loop
- BEGIN
- UTL_FILE.GET_LINE(F1,V1);
- dbms_output.put_line(V1);
- EXCEPTION WHEN No_Data_Found THEN EXIT; END;
- end loop;
- IF UTL_FILE.IS_OPEN(F1) THEN
- dbms_output.put_line('File is Open');
- end if;
- UTL_FILE.FCLOSE(F1);
- END;
- /
- set serveroutput off;
- -----------------------------
- Error starting at line : 5 in command -
- DECLARE
- Error report -
- ORA-06550: line 1, column 7:
- PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
- begin function package pragma procedure subtype type use
- <an identifier> <a double-quoted delimited-identifier> form
- current cursor
- 06550. 00000 - "line %s, column %s:\n%s"
- *Cause: Usually a PL/SQL compilation error.
- *Action:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement