Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to spool single quotes in text file ?
Use 3 single quotes to spool single quote.
Sujit
----- Original Message -----
From: Yexley Robert D SSgt AFIT/SCA <Robert.Yexley_at_afit.af.mil>
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
Sent: Saturday, November 04, 2000 2:35 AM
Subject: RE: How to spool single quotes in text file ?
> Try using the CHR() function. Insert the function anywhere in your string
> where you will need the single quote to be output. Either CHR(39) or
> CHR(167) should both work.
>
> Hope this helps and works for you.
>
> -::YEX::-
> <)))><
>
> -----Original Message-----
> Sent: Friday, November 03, 2000 1:41 PM
> To: Multiple recipients of list ORACLE-L
>
>
> Hi!
>
> I'm trying to generate a text file, that spools all datafiles in a
database
> and generates an alter database file.
>
> set heading off
> set feedback off
> set linesize 300;
> set pagesize 200;
> spool c:\datafiles.sql;
> select 'alter database datafile ' ||name|| ' autoextend on next 50m
maxsize
> 1000m;' from v$datafile;
> spool off
> @c:\datafiles.sql
> exit
>
> How do I get Oracle to do single quotes around the datafile names? Simply
> using two single quotes doesn't work...
>
> select 'alter database datafile '' ||name|| '' autoextend on next 50m
> maxsize 1000m;' from v$datafile;
>
> Gives me
> alter database datafile ' ||name|| ' autoextend on next 50m maxsize 1000m;
>
> Any idea?
>
> This is 8.1.6.
>
> Thanks,
> Helmut
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Helmut Daiminger
> INET: hdaiminger_at_vivonet.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Yexley Robert D SSgt AFIT/SCA
> INET: Robert.Yexley_at_afit.af.mil
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
Received on Mon Nov 06 2000 - 21:00:18 CST