RE: util file help required

RE: util file help required

 

  

Trying putting the path in single quotes or put it in variable and use it.

god luck

-Harmeet

-----Original Message-----
From: hrishy [mailto:[Email Address Removed] Tuesday, April 30, 2002 5:24 AM
To: LazyDBA.com Discussion
Subject: util file help required


Hi Folks
[Email Address Removed] declare
2 type my_curs_type is REF CURSOR;
3 curs my_curs_type;
4 --str varchar2(1000);
5 --t_name varchar2(50);
6 c_name varchar2(50);
7 --tab_name varchar2(2000);
8 cursor cur_tab_name is select distinct table_name
as tab_name from
9 user_tables where table_name like '%917';
10 query_txt varchar2(4000);
11 output utl_file.file_type;
12 begin
13 output := utl_file.fopen( /db/oracle/test,
view.txt, 'w' );
14 for rr in cur_tab_name loop
15 OPEN curs FOR select column_name from
user_tab_columns
16 where table_name=rr.tab_name and column_name
17 not in ('T$REFCNTD','T$REFCNTU');
18 query_txt := 'create or replace view
'||rr.tab_name||'_vw as select ';
19 loop
20 fetch curs into c_name;
21 EXIT WHEN curs%NOTFOUND;
22 query_txt := query_txt||c_name||',';
23 end loop;
24 close curs;
25 query_txt := rtrim(query_txt,',');
26 query_txt := query_txt||' from '||rr.tab_name;
27 dbms_output.put_line(query_txt);
28 util_file.put(output,query_txt);
29 util_file.newline(output);
30 end loop;
31 utl_file.fclose( output );
32 end;
33 /
output := utl_file.fopen( /db/oracle/test,
view.txt, 'w' );
*
ERROR at line 13:
ORA-06550: line 13, column 30:
PLS-00103: Encountered the symbol "/" when expecting
one of the following:
( ) - + mod not null others <an identifier>
<a double-quoted delimited-identifier> <a bind
variable> avg
count current exists max min prior sql stddev sum
variance
cast <a string literal with character set
specification>
<a number> <a single-quoted SQL string>


am i using the proceedure rightly .as i getting a
message

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--------
Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed] the list archive: http://www.LAZYDBA.com/odbareadmail.pl
Tell yer mates about http://www.farAwayJobs.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html


*==============================*
Any views expressed in this communication are those of the individual
sender, except where expressly identified as the views of the Fundtech
Corporation. This message contains confidential information of the sender
or Fundtech as applicable and is intended only for the individual named. You
may not disseminate or distribute this message. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
immediately delete this e-mail from your system. E-mail transmission cannot
be guaranteed to be secure or error-free as information could be
intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
contain viruses. Neither the sender nor Fundtech accept liability for any
errors or omissions in the contents of this message which arise as a result
of e-mail transmission.
*==============================*
Oracle LazyDBA home page