Go to the FreeLists Home Page Home Signup Help Login
 



[oracle-l] || [Date Prev] [09-2005 Date Index] [Date Next] || [Thread Prev] [09-2005 Thread Index] [Thread Next]

RE: Including special characters in query generation

  • From: "Mercadante, Thomas F (LABOR)" <Thomas.Mercadante@xxxxxxxxxxxxxxxxx>
  • To: <chiragdba@xxxxxxxxx>, "Oracle-L Freelists" <oracle-l@xxxxxxxxxxxxx>, <askdba@xxxxxxxxxxxxx>
  • Date: Fri, 2 Sep 2005 11:54:00 -0400
Chirag,

 

I think you have unbalanced quotes:

 

select 'exec dbms_stats.gather_schema_stats (ownname=>' || ''''
||username||

       '''' || 

  ' estimate_percent=>dbms_stats.auto_sample_size,method_opt=>for all
columns size repeat,degree =>7)' 

from dba_users

 

 

When I pasted your query into Toad, it showed your number of quotes were
off.

I changed it to the above and it returned a correct string.

 

Make sure you skip the appropriate schemas like SYS, SYSTEM, OUTLN,
DBSNMP  etc.....

 

where username not in ('SYS','SYSTEM',etc.)

 

Good Luck!

 

Tom

 

________________________________

From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Chirag DBA
Sent: Friday, September 02, 2005 11:40 AM
To: Oracle-L Freelists; askdba@xxxxxxxxxxxxx
Subject: Including special characters in query generation

 

I want to generate a script for all users.

 

What is wrong here? There is one set parameter to set special characters
off.

 

select 'exec dbms_stats.gather_schema_stats
(ownname=>''''||username||'''||'
estimate_percent=>dbms_stats.auto_sample_size,method_opt=>'||'''for all
columns size repeat''',degree =>7)' from dba_users; 

select 'exec dbms_stats.gather_schema_stats
(ownname=>'||'''||username||'''||'
estimate_percent=>dbms_stats.auto_sample_size,method_opt=>'||'''||for
all columns size repeat||''',degree =>7)' from dba_users; 
 

can anyone tell me what is missing here ? 

 

Regards - Chirag 





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.