Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: dynamic sql question HELPPPPPPPPPP

Re: dynamic sql question HELPPPPPPPPPP

From: <rock_cogar_at_my-deja.com>
Date: Thu, 06 Jan 2000 12:49:39 GMT
Message-ID: <852310$n95$1@nnrp1.deja.com>


I do not know what DBMS_SQL is, but from SQL+ you could:

  1. Write a script like:

select 'analyze table '||table_name||' compute statistics;' from user_tables;

2. Run the result set (275 rows ?) in SQL+ to do the analysis.

3. Generate the 275 rows long "Counts" report like:

select table_name,num_rows from user_tables order by table_name asc;

In article <850p9j0oss_at_enews4.newsguy.com>,   "gndiving" <dwhite_at_vrinter.net> wrote:
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_01A7_01BF57B7.40C44720
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> HI all I have a DBMS_SQL question
>
> I need to read the rowcount of a group of tables(275) into a
variable =
> how can I do this dynamically
>
> I have DBMS_SQL.PARSE(datCursor,SELECT COUNT(*) FROM ' || =
> datTableName,DBMS_SQL.NATIVE);
> WHATS IAM HAVING PROBLEMS WITH IS THE DBMS_SQL.COLUMN_DEFINE STATEMENT
> IF SOME ONE COULD GIVE ME A SOLUTION TO THIS IT WOULD BE GREATLY =
> APPRECIATED
>
> SEND REPLY'S TO
>
> dwhite_at_mail.intracorp.com
>
> ------=_NextPart_000_01A7_01BF57B7.40C44720
> Content-Type: text/html;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META content=3D"text/html; charset=3Dwindows-1252" =
> http-equiv=3DContent-Type>
> <META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR></HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT size=3D2>HI all I have a DBMS_SQL question</FONT></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><FONT size=3D2>I need to read the rowcount of a group of =
> tables(275) into a=20
> variable how can I do this dynamically</FONT></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><FONT size=3D2>I have DBMS_SQL.PARSE(datCursor,SELECT COUNT(*) =
> FROM&nbsp; '=20
> ||&nbsp;datTableName,DBMS_SQL.NATIVE);</FONT></DIV>
> <DIV><FONT size=3D2>WHATS IAM HAVING PROBLEMS WITH IS THE =
> DBMS_SQL.COLUMN_DEFINE=20
> STATEMENT</FONT></DIV>
> <DIV><FONT size=3D2>IF SOME ONE COULD GIVE ME A SOLUTION TO THIS IT =
> WOULD BE=20
> GREATLY APPRECIATED</FONT></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><FONT size=3D2>SEND REPLY'S TO</FONT></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><FONT size=3D2><A=20
>

href=3D"mailto:dwhite_at_mail.intracorp.com">dwhite_at_mail.intracorp.com</A>< /=
> FONT></DIV>
> <DIV>&nbsp;</DIV></BODY></HTML>
>
> ------=_NextPart_000_01A7_01BF57B7.40C44720--
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Jan 06 2000 - 06:49:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US