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 -> SCRIPT: FIX ME PLEASEEEE!!!!!!!! :(

SCRIPT: FIX ME PLEASEEEE!!!!!!!! :(

From: Jonus <Jonus123_at_YAHOO.COM>
Date: Fri, 16 Apr 1999 21:43:23 -0400
Message-ID: <3717E73B.B15EE131@YAHOO.COM>


Hi everyone

    Below is a script that needs attention.

select 'update mytable tm
set num_of_rows"= (select num_rows from user_tables a where table_name = ' ||''''||table_name||''''||' and a.table_name =
'||''''||table_name||''''||'
and a.'||'table_name'||' = tm.'||'table_name'||')'||';' from sys.user_tables;

UNSCRIPTED VERSION on a single table **

update mytable tm

            set "num_of_rows"= (select count(a.num_rows)
            from user_tables a, user_tables b
            where a.table_name = b.table_name
            and a.table_name = 'USER_PROFILE'
            and a.table_name = tm.table_name);


The script works, but it doesn't transfer the num_rows to each table. It insteads updates all rows with the same numeric value for every table updated. Any
sugesstions on what I'm doing wrong??????? to get an INDIVIDUAL COUNT..

I'm getting this                               when i should be getting
this
XXXX                                            XXX
____                                            _____
5                                                 6
5                                                54 
5                                               456
5                                                 5
5                                                88
5                                                87
5                                                76
5                                                34
5                                                22
5                                                 5



Can some help me to fix this.. I tried it using: select Count(num_rows) and select num_rows

Jonus Received on Fri Apr 16 1999 - 20:43:23 CDT

Original text of this message

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