A query to identify all the tables

Is there a way to write a query (excuse my ignorance) to identify all the tables where an specifc code resides? I have something to play with it
The table always have the SBGI_CODE identifier
For example:
SOBSBGI_SBGI_CODE
SORBCNT_SBGI_CODE
SORBCMT_SBGI_CODE
There are more tables, I am familiar with some of them, but not all of them I need to write a project plan, so I need to be able to identify all the tables and I am one the individuals who like SQL not reading documentation
If this is possible, I will appreciated any input

Or do you try to find all tables which names contain the string 'SBGI_CODE'?
Then USER_|ALL_|DBA_TABLES is the view to query upon.
You see, different answers to one question. That seems to imply that you did not give sufficient information. Please try to be as clear as possible next time.

Similar Messages

  • Sql query to identify all the responsibilities attached to a form

    (oracle - apps) Can anyone help me by giving a sql query to identify all the responsibilities attached to a form and corresponding menu should not be in the menu exclusion.
    Thanks in advance
    Venki

    Bump

  • Query to Find all the Tables and their corresponding columns,dataType in DB

    Hi all,
    I need a query which can give me all the Tables existing in my DB and their corresponding Columns existed for those tables and Datatype for each column .
    Thanks in Advance,
    viajy

    Hi,
    For your user tables you can use USER_TAB_COLUMNS.
    Just give DESC USER_TAB_COLUMNS at your SQL> prompt.
    You will know on that object.
    Regards,
    Sailaja

  • Need query to identify all the alert mail programs

    Hello all,
    How to identify all the alert mail programs which sends only attachment.
    Please help me in this regard.
    Regards,
    Kiran

    Hi,
    Did you try eTRM website? Search for ALR, and you should get the Alert link, and browse the ALR tables.
    Regards,
    Hussein

  • Query to see all the tables in db

    I want all tables seeing in the PLSQL

    Why PL/SQL?
    select table_name from dba_tables
    order by ;You can also check the variations with USER_TABLES (to see the tables owned by the current user), ALL_TABLES (to check the tables the current user has access to) etc.
    Cheers
    Sarma.

  • SQL Query to search all the tables for a given string

    Hi all,
    This is concerning a query to search each and every table/column for a given string.
    I came across a similar post (Re: question about searching 600 tables and this query seems to be inline with my requirements:
    select table_name,
    column_name,
    :search_string search_string,
    result
    from cols,
    xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
    columns result varchar2(10) path '.'
    where table_name in ('MY_TABLE')
    However, I am getting the following error:
    ORA-24451: OCIKCallPushTrusted, Maximum call depth exceeded
    I am using Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit and could you please let me know the best possible way to accomplish this task?
    Thanks.
    Edited by: itech.quest on Sep 19, 2010 8:30 AM

    Hi Tamir,
    Thanks so far. I am yet to make the crucial breakthrough as far my application goes. Are you talking about the EUL5_QPP_STATS table? I tried retrieving worksheets even from that table also with the following query
    SELECT DISTINCT Eul5QppStats.QS_DOC_NAME,Eul5QppStats.QS_DOC_DETAILS
    FROM EUL5_QPP_STATS Eul5QppStats,EUL5_DOCUMENTS Eul5Documents
    WHERE Eul5QppStats.QS_DOC_NAME = Eul5Documents.DOC_NAME
    However, the worksheet data retrieved by Discoverer Oracle's product is not matching my dataset for every workbook. Please suggest.
    Reg
    Thomas

  • How to identify all the information for a given company code?

    Hi,
    Our company provides data migration services for SAP and other ERP applications. Our customers provide us the specifications for extractions and conversions. We use one or more 3rd party tools to extract data from legacy systems into text/Excel files. Customers use LSMW to load generated files.
    We just got an unusual request. This customer wants to get ALL the data from SAP for a given company code and dump into Excel. They would do some manual editing on the data and load it into a new SAP client.
    In the past, customers would be more specific in their requirements. For example, they will mention Materials, Customers, Inventory, etc. In this case, the customer simply wants ALL the data for a given company code.
    Q1. Is everything in SAP related to company code, either directly or indirectly? For example, can materials be filtered by company code?
    Q2. The tools that we use let us extract data from SAP using SQL-like queries. How do I identify ALL the tables that I would need for a given company code?
    My feeling is the customer themselves are not clear on what they really want. Perhaps they are expecting us to guide them.
    I would appreciate any thoughts that you may have.
    If there is a more appropriate forum for this question, please let me know.
    Thank you in advance for your help.
    Regards,
    Peter

    hi
    t001w is the master table for plants, u can see all plants in this table.
    regads:
    rajesh.k

  • How to identify all the child tables referencing a master table

    Hi,
    How to identify all the child tables referencing a master table.
    Could you please help me...
    Thanks in advance...

    Hi!
    You may use this query:
    SELECT master.table_name, child.table_name
    FROM   user_constraints master, user_constraints child
    WHERE  master.table_name IN ('REGIONS')
      AND  master.constraint_name = child.r_constraint_name
    /yours sincerely
    Florian W.

  • Power Query Cannot Access all the NAV Table

    When I connect to NAD Database via PowerPrivot, I can get all the NAV table it's around 1936 tables, however when I access via Power Query it will only able to access around 1100 tables. All the important tables are not showing at the workbook Queries. Can
    anyone help please?
    Henry

    Ok, I have some more info on this. We found this bug right near the time we GA'd but it was too late to take the fix. It will be available in our next release. I don't know if we've officially announced the date but you should have it within the next month
    or so.
    There should be two workarounds until you have the fix:
    As I mentioned in the last reply, when connecting to the SQL database, instead of just typing in a server name, you can also specify the database name directly.
    If you don't specify the database, when you're viewing the list of tables in the sidepane on the right side of Excel, select any of them and click Edit near the bottom (or double click on the table name.) This will open up the wrong table in the Query Editor.
    Then you can expand the database navigator on the left side of the Query Editor and you should see all the tables in that list.
    [Oops, I see that Peter and I replied at the same time! I'll leave my note here anyway.]

  • How to generate test data for all the tables in oracle

    I am planning to use plsql to generate the test data in all the tables in schema, schema name is given as input parameters, min records in master table, min records in child table. data should be consistent in the columns which are used for constraints i.e. using same column value..
    planning to implement something like
    execute sp_schema_data_gen (schemaname, minrecinmstrtbl, minrecsforchildtable);
    schemaname = owner,
    minrecinmstrtbl= minimum records to insert into each parent table,
    minrecsforchildtable = minimum records to enter into each child table of a each master table;
    all_tables where owner= schemaname;
    all_tab_columns and all_constrains - where owner =schemaname;
    using dbms_random pkg.
    is anyone have better idea to do this.. is this functionality already there in oracle db?

    Ah, damorgan, data, test data, metadata and table-driven processes. Love the stuff!
    There are two approaches you can take with this. I'll mention both and then ask which
    one you think you would find most useful for your requirements.
    One approach I would call the generic bottom-up approach which is the one I think you
    are referring to.
    This system is a generic test data generator. It isn't designed to generate data for any
    particular existing table or application but is the general case solution.
    Building on damorgan's advice define the basic hierarchy: table collection, tables, data; so start at the data level.
    1. Identify/document the data types that you need to support. Start small (NUMBER, VARCHAR2, DATE) and add as you go along
    2. For each data type identify the functionality and attributes that you need. For instance for VARCHAR2
    a. min length - the minimum length to generate
    b. max length - the maximum length
    c. prefix - a prefix for the generated data; e.g. for an address field you might want a 'add1' prefix
    d. suffix - a suffix for the generated data; see prefix
    e. whether to generate NULLs
    3. For NUMBER you will probably want at least precision and scale but might want minimum and maximum values or even min/max precision,
    min/max scale.
    4. store the attribute combinations in Oracle tables
    5. build functionality for each data type that can create the range and type of data that you need. These functions should take parameters that can be used to control the attributes and the amount of data generated.
    6. At the table level you will need business rules that control how the different columns of the table relate to each other. For example, for ADDRESS information your business rule might be that ADDRESS1, CITY, STATE, ZIP are required and ADDRESS2 is optional.
    7. Add table-level processes, driven by the saved metadata, that can generate data at the record level by leveraging the data type functionality you have built previously.
    8. Then add the metadata, business rules and functionality to control the TABLE-TO-TABLE relationships; that is, the data model. You need the same DETPNO values in the SCOTT.EMP table that exist in the SCOTT.DEPT table.
    The second approach I have used more often. I would it call the top-down approach and I use
    it when test data is needed for an existing system. The main use case here is to avoid
    having to copy production data to QA, TEST or DEV environments.
    QA people want to test with data that they are familiar with: names, companies, code values.
    I've found they aren't often fond of random character strings for names of things.
    The second approach I use for mature systems where there is already plenty of data to choose from.
    It involves selecting subsets of data from each of the existing tables and saving that data in a
    set of test tables. This data can then be used for regression testing and for automated unit testing of
    existing functionality and functionality that is being developed.
    QA can use data they are already familiar with and can test the application (GUI?) interface on that
    data to see if they get the expected changes.
    For each table to be tested (e.g. DEPT) I create two test system tables. A BEFORE table and an EXPECTED table.
    1. DEPT_TEST_BEFORE
         This table has all EMP table columns and a TEST_CASE column.
         It holds EMP-image rows for each test case that show the row as it should look BEFORE the
         test for that test case is performed.
         CREATE TABLE DEPT_TEST_BEFORE
         TESTCASE NUMBER,
         DEPTNO NUMBER(2),
         DNAME VARCHAR2(14 BYTE),
         LOC VARCHAR2(13 BYTE)
    2. DEPT_TEST_EXPECTED
         This table also has all EMP table columns and a TEST_CASE column.
         It holds EMP-image rows for each test case that show the row as it should look AFTER the
         test for that test case is performed.
    Each of these tables are a mirror image of the actual application table with one new column
    added that contains a value representing the TESTCASE_NUMBER.
    To create test case #3 identify or create the DEPT records you want to use for test case #3.
    Insert these records into DEPT_TEST_BEFORE:
         INSERT INTO DEPT_TEST_BEFORE
         SELECT 3, D.* FROM DEPT D where DEPNO = 20
    Insert records for test case #3 into DEPT_TEST_EXPECTED that show the rows as they should
    look after test #3 is run. For example, if test #3 creates one new record add all the
    records fro the BEFORE data set and add a new one for the new record.
    When you want to run TESTCASE_ONE the process is basically (ignore for this illustration that
    there is a foreign key betwee DEPT and EMP):
    1. delete the records from SCOTT.DEPT that correspond to test case #3 DEPT records.
              DELETE FROM DEPT
              WHERE DEPTNO IN (SELECT DEPTNO FROM DEPT_TEST_BEFORE WHERE TESTCASE = 3);
    2. insert the test data set records for SCOTT.DEPT for test case #3.
              INSERT INTO DEPT
              SELECT DEPTNO, DNAME, LOC FROM DEPT_TEST_BEFORE WHERE TESTCASE = 3;
    3 perform the test.
    4. compare the actual results with the expected results.
         This is done by a function that compares the records in DEPT with the records
         in DEPT_TEST_EXPECTED for test #3.
         I usually store these results in yet another table or just report them out.
    5. Report out the differences.
    This second approach uses data the users (QA) are already familiar with, is scaleable and
    is easy to add new data that meets business requirements.
    It is also easy to automatically generate the necessary tables and test setup/breakdown
    using a table-driven metadata approach. Adding a new test table is as easy as calling
    a stored procedure; the procedure can generate the DDL or create the actual tables needed
    for the BEFORE and AFTER snapshots.
    The main disadvantage is that existing data will almost never cover the corner cases.
    But you can add data for these. By corner cases I mean data that defines the limits
    for a data type: a VARCHAR2(30) name field should have at least one test record that
    has a name that is 30 characters long.
    Which of these approaches makes the most sense for you?

  • To find particular value in all the tables in the db

    Hi All
    I need to find out all the tables, corresponding column name by querying a particular string that appears in any of the columns in the any of the tables in the db.
    Please help me of this.
    Thanks

    Oh dear you want to look for a particular data in all the tables in the database and say this data is available in these tables in these columns. Oh boy thats going to cost you a lot. why do you want to do that. can you share with us why you want to do that.
    Thanks,
    Karthick.

  • Selecting string from all the tables in databse

    Hi All,
    I need a help in finding the data from all the database tables at one time using single query.
    For e.g. I wanna search a string 'ABC' in all the database tables for a schema.
    I want to find out,which all tables (in either of its columns) contain this string strored inside themselves.
    For brand name changing,I need to find out all the tables and in turn all the columns containing that string where databse consisting of 1000 tables.
    Could anyone suggest me some option for this?Is it possible to avoid this tedious task to search individual table?

    Why is it necessary to search every column? Does your data model permit the brand name to be stored in any column?
    Whatever.
    I suggest starting with dba_tab_columns (where owner = 'WHATEVER') and look for those tables/columns that could possibly hold the brand name. You can eliminate NUMBER and DATE columns and VARCHAR columns that are too short.
    Spool that out to another script where each select statement is like this:
    SELECT 'TABLE_NAME.COLUMN_NAME', column_name
    FROM table_name
    WHERE UPPER(COLUMN_NAME) LIKE '%BRAND NAME%'
    AND rownum = 1;

  • How to see all the tables in ABAP

    how to see all the tables in ABAP
    i need to see all the tables present in tcode se16.

    Hi Thiru ,
    its tough to give all.so pls see the below links u can get all.
    http://www.erpgenie.com/abap/tables.htm
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=listofalltablesin+abap&cat=sdn_all
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.sap-img.com/ab017.htm
    http://abap-gallery.blogspot.com/
    thanks
    karthik

  • To drop all the tables in a database

    hi,
    I have 25000 tables in a database.I want ot delete all the tables and then i have to import the dump.For deleting all the tables what query has to be given.
    Thanks in advance,
    R.Ratheesh

    The code would be
    BEGIN
       FOR c IN (SELECT owner,
                        table_name
                   FROM all_tables
                  WHERE owner IN ('YOUR_OWNER1', 'YOUR_OWNER2_ETC'))
       LOOP
          EXECUTE IMMEDIATE    'drop table '
                            || c.owner
                            || '.'
                            || c.table_name
                            || ' cascade constraints';
       END LOOP;
    END;
    the user ,tablespaces ,datafiles has to be recreatedbut still dropping the user would be the simplest option
    you don't have to recreate tablespaces and datafiles for that.

  • Recordcount for all the tables in my user

    How I will get recordcount for all the tables in my user
    with a single query??
    Plz help.
    Thanx in advance.

    Not possible. As there can be any number of tables with any names, this requires dynamic SQL.
    SQL given to the Oracle SQL Engine cannot be dynamic ito scope and references - it must be static. For example, one cannot do this:
    SELECT count(*) FROM :table
    For the SQL Engine to parse the SQL, determine if it is valid, determine the scope and security, determine an execution plan, it needs to know the actual object names. Objects like tables and columns and functions cannot be variable.
    You will therefore need to write a user function (in PL/SQL) that dynamically creates a [SELECT COUNT] SQL for a table, execute that SQL and return the row count - and then use SQL to iterate through USER_TABLES for example and sum the results of this function.
    Note that object tables are not listed in USER_TABLES - thus a more comprehensive list of all table objects in your schema can be found in USER_OBJECTS.

Maybe you are looking for

  • Why can I not download itunes to my new Windows 7 laptop?

    I have just purchased a new Samsung laptop but when i go to download ITunes from apple website the download doesnt do anything, is there anything i need to turn off or on??

  • Bluetooth icon not showing up in menu bar

    Usually, the Bluetooth icon always shows up in my menu bar upon start-up. Lately it has not been appearing. In my system preferences, the show blue-tooth icon in menu bar is checked. If I uncheck it and then check it again it shows up where it is sup

  • Function module WWW_ALV_CALL is not released for the Internet

    Hi I am facing this error Function module WWW_ALV_CALL is not released for the Internet and Only user SAP can release the function module. Best Regards GAGAN

  • MPGA aka MPEG 1 Layer 1 Audio

    I've spent the better part of this evening looking for an MPGA plug-in for Quicktime. I have a considerably large collection of videos (mostly) encoded with Xvid for video and MPGA for audio so running 160gb+ worth of video through Divx Doctor II isn

  • Interaction on Windows 8//content preview

    Hi, we would like to create an applikation that runs on Windows 8, on a Sony Vaio tap 20. For this we already prototyped in Indesign, including panorama, buttons, links, pan and tilt and in generally all interactive elements. Is there a way to export