Take the table count and display

Hi guys,.

I want to display the number of multiple tables using all_tables

for example

Select table_name from all_tables where table_name like '% AUS.

and display output like this

AUS1 - 10

AUS123 - 20

Australia - 30

I have tried to use any Union but wanted to display the name of the table with the corresponding charges

Here's a basic way:

DECLARE

ln_count NUMBER;

BEGIN

FOR rec IN (select master, table_name from all_tables where table_name like 'AUS %')

LOOP

RUN IMMEDIATELY "SELECT COUNT (*) FROM" | Rec.Owner | '.' || Rec.table_name INTO ln_count;

dbms_output.put_line(Rec.Owner ||) '.' || Rec.table_name | ' - ' || ln_count);

END LOOP;

END;

/

Tags: Database

Similar Questions

  • call a stored procedure for each row in the transitional attribute and display the data in the form of af: table. The other rows are based on the entities

    Hi Experts,

    JDeveloper 12.1.3.0.0

    I have a VO based on entity object. With a column of the VO is transient attribute (I created).

    I need to call a stored procedure for each row in the transitional attribute and display the data in the form of af: table. As well as other attributes.

    So can anyone suggest how can I achieve this?

    Thank you

    AR

    I think that you need a stored function (which returns the value) in this case, is not?

    Take a look at:

    https://docs.Oracle.com/CD/B31017_01/Web.1013/b25947/bcadvgen005.htm

    and search for:

    Invoking stored function with only Arguments in

    call your function in the Get attribute and return value accessor...

  • I have a PC brand new - HP and played Chess Titans. Now all of a sudden it says it cannot find the texture, but he said no zero the reference count and then could not find device 3D.

    original title: Chess Titans

    I have a PC brand new - HP and played Chess Titans.  Now all of a sudden it says it cannot find the texture, but he said no zero the reference count and then could not find device 3D.  What's past and how to fix this.  Thank you.

    These error messages can occur if you (or software) also disabled Aero. Aero must be on (and supported by the video card) to play Chess Titans. "192GO should be enough for everyone." (of the miniseries "Next generation jokes")

  • Windows 7 update everytime I open Chess Titans I have to turn the Board at my side. I'm black and it opens always white, take the 1st pass and remains there unless I smile it 180 degrees

    original title: Chess Titans little Caprice

    Windows 7 update everytime I open Chess Titans I have to turn the Board at my side. I'm black and it opens always white, take the 1st pass and remains there unless I smile it 180 degrees.

    Hi Woody15380,

    Chess Titans walk and check if that helps
    .
    Use this link to turn off the game and then turn on again.
     
    Also delete all the files in C:\Users\user name\AppData\Local\Microsoft Games\Chess Titans
     
    Aziz Nadeem - Microsoft Support
  • Why my Illustrator images become thicker strokes when I take the bounding box and make it smaller?

    Why my Illustrator images become thicker strokes when I take the bounding box and make it smaller? It never happened to me. I'm not an expert in Illustrator, but I do know some basic principles.

    In the preferences, is the scale strokes and effects verified?

  • How do I click on a cell in a table control and display the value in a string?

    What I want to do is click on a cell in a table control and have the value of the cell in an indicator of the chain. Cell that ever I click on, I wish that the value to be displayed in the indicator.

    Thank you!

    Use the property "Change Position".

  • The Stimulus of the Table load and run in the stream or target RT via Ethernet?

    I need to re-read a CAN track with the high fidelity and sequencing of rapid fire. The PC operating system is in the way too much to be able to control this tight of the moment. It must be managed within the target in real time.

    Do the stimulus of the table the stimulus replay load data to the RT, and then run the target of RT, or don't work space running on the PC the data flow to the RT for execution? Streaming would be subject to delays of PC operating system and network transport times.

    Thanks in advance for your help.

    Table of stimulus data gets loaded completely in memory on the target of RT and are replayed from there. PC or network delays has no effect on reading as soon as it starts.

  • Search for a similar string in the 2D array and displays the result with another column

    Hello

    One who can help, I have a chart 2D of txt file that have as many lines and 5 columns and I want to do a search and display the other results of the column.

    For example.

    Column 0                      1                           2                                  3                           4

    12345 qwer asdf 12qwe tjhrtyert

    werr 23568 wef fgertge fsefff

    If I manage to find 12345 and I want to display 12qwe, what should I do in labview? Help, please!

  • How to save the table column and row headings

    I have a table where I activated the column and row headings.  Once the table is loaded with data, I would like to save the contents of the table, including the column and row headings in a text file.  The crux of "value" property returns only the content of the table, not the row and column headers.  I could use "header line chains []" and '[] column header chains' property nodes as well, but I'm in the island there is an easier way.  Looks like adding the headers of lines would be difficult.  Any ideas?

    Thanks in advance.

    Here is a way. The construction with the empty constant is to provide to the left corner of the table where there is no data.

  • folder Windows NT has files listed in the table TextService and I can not delete or remove them due to trustedinstaller being above me, the administration system. How can I remove these?

    These files do not allow me the owner of this computer to support in the permissions area or allow me to delete them in windows safe mode. I also can't do anything with the permission of edition since the Trusted Installer is the only access to those files.

    The file is Windows NT with two subfolders and I can't access or remove one of them.
    I want to delete these files to windows and my computer, how do I remove the Installer only access?

    I was finally power with some help of a video get youtube the answer that I need to take in charge and delete the files with out having to down load any software.

    files are gone from my computer after using the edit view and change the file sharing, then enter the permissions and change permissions for folder with my user as owner.
    This non-greyed out the locked area to finally remove the files and allowing me to access the files.
    If you think that microsoft could have posted a simple is how its done.
    step by step.
  • table col name get the details of the table column and inserting of values depending on the data type of the column

    Hello

    I am train to write a procedure where I would spend the table as a parameter name and then the code would determine it is column names, and then he would insert records in each column depending on the data type. could someone help me with this.

    Thank you

    SM

    Hello

    Perhaps you need to dummy data just for the table.

    Here is my exercise

    create or replace
    procedure generate_rows(p_table_name varchar2, p_count number)
    is
      --
      function insert_statement(p_table_name varchar2) return clob
      is
        l_columns clob;
        l_expressions clob;
        l_sql clob default
          'insert into p_table_name (l_columns) select l_expressions from dual connect by level <= :p_count';
      begin
        select
          -- l_columns
          listagg(lower(column_name), ',') within group (order by column_id),
          -- l_expressions
          listagg(
            case
            when data_type = 'DATE'
              then  'sysdate'
            when data_type like 'TIMESTAMP%'
              then  'systimestamp'
            when data_type = 'NUMBER'
              then  replace('dbms_random.value(1,max)',
                      'max', nvl(data_precision - data_scale, data_length)
                    )
            when data_type = 'VARCHAR2'
              then  replace(q'|dbms_random.string('a',data_length)|',
                      'data_length', data_length
                    )
            else
                    'NULL'
            end, ',') within group (order by column_id)
        into
          l_columns,
          l_expressions
        from user_tab_columns
        where table_name = upper(p_table_name);
        --
        l_sql := replace(replace(replace(l_sql,
          'p_table_name', p_table_name),
          'l_columns', l_columns),
          'l_expressions', l_expressions);
        -- debug
        dbms_output.put_line(l_sql);
        --
        return l_sql;
      end;
    begin
      execute immediate insert_statement(p_table_name) using p_count;
    end;
    /
    
    -- test
    create table mytable(
      id number(4,0),
      txt varchar2(10),
      tstz timestamp with time zone,
      dt date,
      xml clob
    )
    ;
    set serveroutput on
    exec generate_rows('mytable', 10);
    select id, txt from mytable
    ;
    drop procedure generate_rows
    ;
    drop table mytable purge
    ;
    
    Procedure GENERATE_ROWS compiled
    Table MYTABLE created.
    PL/SQL procedure successfully completed.
    
    insert into mytable (id,txt,tstz,dt,xml) select dbms_random.value(1,4),dbms_random.string('a',10),systimestamp,sysdate,NULL from dual connect by level <= :p_count
            ID TXT
    ---------- ----------
             3 WnSbyiZRkC
             2 UddzkhktLf
             1 zwfWigHxUp
             2 VlUMPHHotN
             3 adGCKDeokj
             3 CKAHGfuHAY
             2 pqsHrVeHwF
             3 FypZMVshxs
             3 WtbsJPHMDC
             3 TlxYoKbuWp
    
    10 rows selected
    
    Procedure GENERATE_ROWS dropped.
    Table MYTABLE dropped.
    

    and here is the vision of Tom Kyte for the same https://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:2151576678914

    Edit: to improve my code, it must use p_count as bind as Tom.

  • Drag the tables, odd and even rank-background color?

    How can I set the background color of line of odd and even rows? in adf dragged table

    line 1-white

    line 2-black

    line 3-white

    line 4-black

    Always mention jdev version.

    See this post: line alternative color in the table of the ADF

    Dario

  • Create the Table as and hybrid columnar Compression

    I'm looking to connect to tables help to create the table as I had a question about columnar Compression hybrid. For the test, I found that the uncompressed daata will be approximately 10 to and compressed data will be around 1 TB. I anticipate compress the table when the table to create as an instruction and wanted to know in what order Oracle forge do compression, that is, the table will be created then Oracle will compress the data or will the compressed table that the table will be created. The motivation behind the question is to see how much storage I need to complete the operation.

    Thank you

    If you are using
    create table xxx compress for query high what to choose...

    While the data will be compressed before insertion, so in your case, it will use about 1 TB of disk space

  • Differentiate the tables changes and no changes do not

    Hello

    I am relatively new on (I've always been a sort of paper/felt for Whiteboard guy) formal data modeling tools.

    On my question/Scenario:

    I have a warehouse of data with a few hundred tables inside. When changes are made to the data warehouse, we're supposed to present an ER diagram preferably with tables in one color, tables be changed to a different color and the tables does not change does not to another more neutral color.

    Here is my current process

    (1) import of relevant existing tables in the data dictionary
    (2) create tables or change existing tables
    (3) change the type of array for the modified tables and dimension for new tables. The existing tables, I leave it as what.

    Success with this process generates a diagram that fits my purposes, but I have a hunch that I'm not using better methodology. What is a better way to do this using the oracle sql data model (version 3)

    What you certainly works, but a better approach would be to define new types of classification rather than use the Dimension or fact.

    Then go here:
    Tools-> preferences-> data-> diagram maker-> Types of Classification.

    Press the Green plus sign to add a new type.
    Add two new types: new and changed and assign each a unique color.
    Press 'OK' to save.

    Now, when you go back to the diagram, you will have two new types from.

  • Tax calculation based on the user in the box input and displaying the result.

    Thanks to WhyIsThisMe for starting me on my first draft script & Jono! I'm almost there with my purchase requisition form (90% manufactured from the tutorial).  Everything works except for the taxable column

    form.JPG

    I can't understand the correct syntax to check the value of the checkbox in the column taxable and then do the math for the tax based on user input in the field % tax

    (total * stateTaxPercent / 100)

    Essentially, I want to make the calculation only the taxable = 1, and then display the cumulative tax in the tax field.

    Should I use mouseup as trigger to perform the calculation of the tax and save the result as a variable and displays the variable in the tax field? Then if another taxable box gets checked, I could add the new calculation of the variable. Not sure whether in an elegant way to get there.

    ?

    I would put the following text in the change event of each taxable check box (in formcalc):

    If ($ == 1) then

    tax = tax + (amount * 0,0825)

    ElseIf ($ == 0) then

    tax = tax - (quantity * 0,0825)

    endif

    (where 'tax' is what you called your total tax box and the 'amount' is what you called your box of price).

Maybe you are looking for