How do to know all the tables on peoplesoft (on Oracle 8.1) with data

I need to know all the tables on peoplesoft (on Oracle 8.1) < strong > with < facilities > data
and ignore the tables without data.

It takes to write a pl/sql procedure or is there an easy solution?
I wrote an example of code, but I am disconnected programming
for the long and I need help.
Thanks in advance
Pls answer
_______________
Cursosr curtab is select table_name from dba_tables;
curtab() loop
Select count (*) x from curtab;
If x & gt; 0
UTL_FILE. Write ('curtab')
on the other
null;
endif;
end loop;
____________________

Julia wrote:
I need to know all the tables on peoplesoft (on Oracle 8.1) with data
> & ignore tables without data.
>
> It takes to write a pl/sql procedure or is there an easy solution?
> I wrote a code example, but I am disconnected programming
> for a long time and I need help.
> Thanks in advance
> Pls answer
> _______________
> Cursosr curtab is select table_name from dba_tables;
> curtab() loop
> select count (*) x from curtab;
> If x > 0
> utl_file.write ('curtab')
> other
> null;
> endif;
> end of loop;
> ____________________

Consider using the user_tables and it works the relevant schema rather than dba_tables breast or of all_tables as these allows you to specify the schema name too will require.

set serveroutput on;

DECLARE
  cursor curtab is
    select table_name
    from   user_tables;
  --from   all_tables where owner = '';
  v_cnt NUMBER;
BEGIN
  FOR t IN curtab
  LOOP
    EXECUTE IMMEDIATE 'select count(*) from '||t.table_name INTO v_cnt;
    IF v_cnt > 0 THEN
      DBMS_OUTPUT.PUT_LINE(t.table_name);
    END IF;
  END LOOP;
END;
/

Or...

Ensure that statistics were collected for the schema and examine the value of num_rows in the user_tables view. ;)

Tags: Database

Similar Questions

  • How can I know all the history for any shape?

    How can I know all the background and updates on any form of user names and the time or what on the log files?

    Hello.

    On a form, the historical record is limited to the user who created the file, and when it was created, or updated.
    If you need more information, you will need to implement an audit trail.

    Octavio

  • How do you know all the username of connection system/system

    Hi all

    I want to know all the usernames of connection of the system that are existing as user


    concerning

    Srinivas

    Hello

    With the help of DBA_USERS will give more details

    select * from dba_users;
    

    Concerning

  • How will I know all the objects I use in my application.

    As I create my documentation, I realized that it would be useful to know all things that my application uses (tables, views, packages, etc.). Is there a way to find any script or replacing etc.?
    Thank you, people!

    In the report designer, click the utilities tab. Then click on Application Express views. Navigate to the view Apex Application Page regions. Report source will be in the REGION_SOURCE column. Filter by SOURCE_TYPE = 'report '.

    Greg

  • How can I delete all the previous instant messages in Skype / last conversations with contact to laptop

    Hello please how do I delete all old messages or clear after conversations with a Skype client, which is using my laptop.

    Go to tools-> Options-> privacy-> Show advanced options-> clear history.

  • How do we know that the photo and message ready to be sent with Adobe send have actually been sent? through the color change of the e-mail address of the individual aims.

    Please indicate where I can find explanations on how to use Adobe send, I just warned.

    JFB

    Hi JF BONNAM.

    Please see Acrobat.com help | Using Adobe send for some great information how-to on using Adobe send. In particular, the "Viewing of a file of track information" section describes how you can tell who has seen or downloaded your sent files.

    Best,

    Sara

  • How to know all the elements in a block

    Hello everyone.

    Im working with forms and the States 10 G.

    One quick question.

    I need to know all the elements in a block.

    I know with the get_block_property premier_enregistrement and Last_record I know the first and the last point in a record, but
    How do I know all the others?

    Thanks in advance and greetings to all.
    Happy Cristmast

    You can the fisrt element in a block using GET_BLOCK_PROPERTY ('BLOCKNAME', FIRST_ITEM);
    then the loop above the element

    LOOP
      vcItem:=GET_ITEM_PROPERTY(vcItem, NEXTITEM);
      EXIT WHEN vcItem IS NULL;
    END LOOP;
    
  • How will I know fragments of table

    Hello

    How will I know that the table is fragmented.

    Thank you

    If you are in 10g, you can try the Segment Advisor to identify the various questions etc. with your table. This will also provide recommendations on how to improve things.

    (below script shamelessly stolen on the brilliant Oracle Base site)

    -segment_adv_table.sql
    --
    -Use Segment Advisor to analyze a table.
    --
    -Original Version
    -http://www.oracle-base.com/articles/10g/SpaceObjectTransactionManagement10g.php
    --
    -owner is SCOTT
    -table is EMP
    --
    -do a search/replace to change these 2 values and rerun ;)
    --
    --
    DECLARE
    l_object_id NUMBER;
    BEGIN
    -Create a task to advise segment for the SCOTT. EMP table.
    () DBMS_ADVISOR.create_task
    advisor_name-online 'Segment Advisor',
    Task_Name-online "EMP_SEGMENT_ADVISOR."
    Task_DESC => "Segment Advisor for EMP");

    () DBMS_ADVISOR.create_object
    Task_Name-online "EMP_SEGMENT_ADVISOR."
    object_type-online 'TABLE. "
    attr1-online "SCOTT."
    attr2-online "EMP",.
    attr3 => NULL,
    attr4-online "null."
    attr5 => NULL,
    object_id-online l_object_id);

    () DBMS_ADVISOR.set_task_parameter
    Task_Name-online "EMP_SEGMENT_ADVISOR."
    parameter-online "RECOMMEND_ALL."
    value => 'TRUE');

    DBMS_ADVISOR.execute_task (task_name-online 'EMP_SEGMENT_ADVISOR');

    END;
    /

    -View the results.
    SET LINESIZE 250
    TaskName FORMAT A20 COLUMN
    Object_type COLUMN FORMAT A20
    Diagram of the COLUMN FORMAT A20
    Object_name FORMAT A30 COLUMN
    Object_name FORMAT A30 COLUMN
    Message COLUMN FORMAT A40
    COLUMN more_info FORMAT A40

    SELECT f.task_name,
    f.impact,
    o.type as object_type,
    o.attr1 in the form of schema,
    o.attr2 AS object_name,
    f.message,
    f.more_info
    OF dba_advisor_findings f
    JOIN dba_advisor_objects o WE f.object_id = o.object_id AND f.task_name = o.task_name
    WHERE f.task_name IN ('EMP_SEGMENT_ADVISOR', 'USERS_SEGMENT_ADVISOR')
    ORDER BY f.task_name, f.impact DESC;

  • How to value all the sequence all the table schema/user

    Hello

    I use the Oracle 11 g server. I have a table close to 100. I want to know all the current sequence value ("Currval")
    of all the paintings in particular schema/user

    Please help me how can I get with this query

    Thanks in advance
    karmaya

    nordine B wrote:
    Try this...

    SELECT sequence_name, last_number FROM all_sequences
    where lower(sequence_owner) = '';
    

    HTH
    Vanessa B.

    Published by: Vanessa B December 3, 2012 13:25

    It is not always correct (again that depends on the condition)

    create sequence seq1 cache 100;
    
    SELECT sequence_name, last_number
    FROM all_sequences
    where sequence_name = 'SEQ1';
    
    SEQUENCE_NAME                  LAST_NUMBER
    ------------------------------ -----------
    SEQ1                                     1 
    
    select seq1.nextval from dual;
    
    NEXTVAL
    -------
          1
    
    SELECT sequence_name, last_number
    FROM all_sequences
    where sequence_name = 'SEQ1';
    
    SEQUENCE_NAME                  LAST_NUMBER
    ------------------------------ -----------
    SEQ1                                   101 --"Showing 101"
    
    select seq1.currval from dual;
    
    CURRVAL
    -------
          1 --"CURRVAL is different"
    
  • How do I know if the two tables are the same in the data they contain

    Hello

    How will I know if the two tables are the same in the data they contain?

    Hello

    Please check this thread [compare all columns | http://forums.oracle.com/forums/thread.jspa?messageID=3166309�].

    Kind regards

  • How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?

    Hello

    How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?

    Thank you

    Jay.

    Select the connection and right-click on it and select schema statistics collection

  • How to find all the table names in all modules in EBS R12?

    How to find all the table names of all the modules in EBS R12?

    In addition, you can go to http://etrm.oracle.com, you select the version of the EBS, select "FND Data" or "S/n data", select the Type of the object TABLE and you will get all the tables of EBS in module.

  • How to know all the collections photo belongs

    I would like to know all the collections in which appears a given photo

    Thank you for your response.

    What is a false picture?

    When I click on the little badge he told me that the picture belongs to the collection that is selected, even if this photo belongs to 2 collections. I would like to know all the collections in which appears a photo.

  • How can I get the script all the tables and the reference system?

    Hello

    I'm trying to get the scripts of all the tables in my exquema MADE. Please can someone help me?

    Try this - the first script creates a 'tab_ddls' table to hold the table DDLS and second script generates the DDL and stores in this "table"tab_ddls ":

    {code}
    create the table tab_ddls (table_name, varchar2 (50))
    table_ddl clob)
    /

    declare
    cursor tab_cur is
    Select table_name
    from all_tables
    where owner = "MADE";
    CLOB table_ddl;
    Start
    for rec in tab_cur
    loop
    Select dbms_metadata.get_ddl ('TABLE', rec.table_name, 'MADE')
    in table_ddl
    Double;
    insert into tab_ddls (rec.table_name, table_ddl) values;
    end loop;
    dbms_output.put_line ('done');
    commit;
    end;
    /

    Select * from tab_ddls
    /

    {code}

    Please modify the script to fit your needs.

    HTH

    Published by: user130038 on August 2, 2011 11:08

  • How to list all the tables that have no data

    Hi all


    I want to list all the tables that have no data. (registration number is 0)

    Someone help me.

    Thank you
    Thiensu2810

    Select owner, table_name from dba_tables where num_rows = 0;

    This assumes that the table statistics are COMMON.

Maybe you are looking for