SQL  to find which table data is stored?

I know a table field value.
I don't know, which table that value is stored. I want to find that table from database.
What sql will find that?.
Please post me online links for tricky sql's like this...so i can master sql's of this kind.
Thanks for ur help.

Ok, here's my pseudo google DB:
michaels>  var val varchar2(5)
michaels>  exec :val := 'as'
PL/SQL procedure successfully completed.
michaels>  select distinct substr (:val, 1, 11) "Searchword",
                substr (table_name, 1, 14) "Table",
                substr (t.column_value.getstringval (), 1, 50) "Column/Value"
           from cols,
                table
                   (xmlsequence
                       (dbms_xmlgen.getxmltype ('select ' || column_name
                                                || ' from ' || table_name
                                                || ' where upper('
                                                || column_name
                                                || ') like upper(''%' || :val
                                                || '%'')'
                                               ).extract ('ROWSET/ROW/*')
                   ) t
--        where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
       order by "Table"
Searchword  Table          Column/Value                                     
as          DEPARTMENTS    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>    
as          DEPARTMENTS    <DEPARTMENT_NAME>Treasury</DEPARTMENT_NAME>      
as          EMPLOYEES      <EMAIL>PVARGAS</EMAIL>                           
as          EMPLOYEES      <EMAIL>STOBIAS</EMAIL>                           
as          EMPLOYEES      <FIRST_NAME>Douglas</FIRST_NAME>                 
as          EMPLOYEES      <FIRST_NAME>Jason</FIRST_NAME>                   
as          EMPLOYEES      <JOB_ID>AD_ASST</JOB_ID>                         
as          EMPLOYEES      <LAST_NAME>Tobias</LAST_NAME>                    
as          EMPLOYEES      <LAST_NAME>Vargas</LAST_NAME>                    
as          JOB_HISTORY    <JOB_ID>AD_ASST</JOB_ID>                         
10 rows selected.Not as fast as google, so you better take a cup of tea or two ... ;-)

Similar Messages

  • In which table data is stored by text editor

    we enter text in  text editor control.
    but i can't figure out :: it store the text entered in text editor in which table.
    can you help me in this.
    regards.

    Raja,
    firstly my program is working fine, i want to know how FM "READ_TEXT" read text.
    this is coding
    refresh: ltxttab2. clear ltxttab2.
      clear w_thead.
      w_thead-tdobject = 'ZXYZ'.
      w_thead-tdname = mrole.
        w_thead-tdid = 'LTXT'.
      w_thead-tdspras = sy-langu.
      w_thead-tdfuser = sy-uname.
      w_thead-tdfdate = sy-datum.
      w_thead-tdftime = sy-uzeit.
      CALL FUNCTION 'READ_TEXT'
         EXPORTING
         CLIENT                        = SY-MANDT
           ID                            = 'LTXT'
           LANGUAGE                      =  sy-langu
           NAME                          = W_XYZ-TDNAME
           OBJECT                        = 'ZXYZ'
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
      IMPORTING
       HEADER                        =
         TABLES
           LINES                         = LTXTTAB2
       EXCEPTIONS
         ID                            = 1
         LANGUAGE                      = 2
         NAME                          = 3
         NOT_FOUND                     = 4
         OBJECT                        = 5
         REFERENCE_CHECK               = 6
         WRONG_ACCESS_TO_ARCHIVE       = 7
         OTHERS                        = 8
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    regards

  • How to find that from which table data is coming in datasource?

    Hi friends
    I want to find that from which tables data is coming into datasource 2LIS_04_P_COMP,2LIS_04_P_MATNR..
    I have searched in forums.. I also have checked in sap.help.. but I didnt get any tablename in field "Table of origin"..
    Please tell me how can I find that data is coming from which table into these datasources..
    I dont want name of the setup tables.. I want name of the original tables (in R/3)which has data..
    Regards
    Swati

    Hi......
    For  data source 2LIS_04_P_COMP............MCAFKO, MCAFPO, MCCOMP are the R3 communication structures...........
    Check these commonication Structure in SE11............I think u will get the required information........
    2LIS_04_P_MATNR is Material View from PP/PP-PI ..........check this..........
    http://help.sap.com/saphelp_nw70/helpdata/EN/88/7fc73c0c52085be10000000a114084/frameset.htm
    Check this each field in SE11....from there try to find out these fields belongs to which table..........as I hav explained u in another thread..........
    May be the extractor is using these fields from different tables.....
    Regards,
    Debjani........

  • SAP-R/3- In which table, numeric values stored in  equipment characteristis

    SAP-R/3- In which table, numeric values stored in  equipment characteristis are captured.
    In AUSP table Char values in equipment characteristics are captured against object number.But this table does not cappture numeric characteristics.
    Are these numeric values captured in any function module?

    Hi
    check the BAPI  for characteristics
    BAPI_OBJCL_GETDETAIL
    BAPI_OBJCL_CHANGE
    or use the fun module:
    CLAF_CLASSIFICATION_OF_OBJECTS.
    You can use the tables
    CAWN,INOB and AUSP to get the characteristics
    Regards
    Anji

  • Basic type :HRMD_A07  in which table data will be store

    Hi,
    I have the basic type HRMD_A07 .so can any one tell me in which table data will store .
    Thanks in advance.
    Regard

    Hi,
    Check the following link for more information on tables and the flow of information in sd
    <u>http://www.erpgenie.com/sap/abap/tables_sd.htm</u>
    Award points if it adds information.
    Thanks
    Mohan

  • Which is oracle's dictionary to find which TABLE in particular SCHEMA.

    Hi All,
    Which is oracle’s dictionary to find which TABLE in particular SCHEMA with particular ROLE is missing.
    Thanks in advance

    user10699277 wrote:
    Hi
    We have role called XYZ which is assigned to specfic tables in schema ABC.No you don't. Roles are GRANTed (not assigned) to USERS or ROLES, not TABLES.
    There are tables in the same schema which dont have the role XYZ.
    In these case we need to find the table that dont have XYZ role.
    Thanks in Advance...

  • Way to find which tables are being accessed

    Hi Guys
    I have a large database and i want to find which tables are not being accessed (even select) from a specific period of time. is there any way to find out . I am using oracke 10g release 1
    Regards
    Khurana
    Edited by: Khurana on Sep 8, 2009 4:29 PM

    select sp.object_owner,sp.object_name,
    (select sql_text from v$sqlarea sa
    where sa.address = sp.address
    and sa.hash_value =sp.hash_value) sqltext,
    (select executions from v$sqlarea sa
    where sa.address = sp.address
    and sa.hash_value =sp.hash_value) no_of_full_scans,
    (select lpad(nvl(trim(to_char(num_rows)),' '),15,' ')||' | '||lpad(nvl(trim(to_char(blocks)),' '),15,' ')||' | '||buffer_pool
    from dba_tables where table_name = sp.object_name
    and owner = sp.object_owner) "rows|blocks|pool"
    from v$sql_plan sp
    where operation='TABLE ACCESS'
    and object_owner IN ('YOUR_USER_NAME')
    order by 1,2
    It will tell you that currently "OBJECT_NAME" is being accessed; but i think it is for full table scan.
    Source:http://www.oracle.com/technology/oramag/code/tips2005/032105.html
    Regards
    Girish Sharma

  • Tables in which LSMW data is stored?

    Hi Gurus,
    I would like to know the base tables that LSMW uses. My actual requirement is to fetch the action log of the LSMW object. No option is provided in R/3 to download Action Log of an LSMW object into Excel.
    Hence I am trying to find the tables in which LSMW maintains the Action Log, so that the data could be fetched from the tables and could be redirected to an Excel Sheet. Plz help me in finding the tables.
    Points would be awarded for Solutions.
    Regards,
    Kiran

    Hi
    see the table
    <b>OIC_LSMW_PROJ</b>
    Reward points for useful Answers
    Regards
    Anji

  • How to find which tables are being used by a workbook.

    I was asked by the client to generate a report which will show the Workbook name and it's corresponding tables/views.
    Any idea on how to use the EUL tables for this purpose. I know the SQL query to find the tables in case the workbook was run at least once. But I want to show the Workbook and it's table details even the report was never run.
    Advanced thanks,
    Lokesh.

    Hi Jay
    While we're on the subject of scripts, here's a couple more you might like:
    Script 1:
    =========
    This one shows you how many times an item has been used. It is useful for determining how often users make use of items in a folder. It could be used as research for a materialized view, for dropping items which are not used, or for understanding usage.
    SELECT
    OBJ.OBJ_NAME FOLDER,
    EXP.EXP_NAME ITEM,
    COUNT(QPP.QS_ID) USAGE
    FROM
    EUL5_OBJS OBJ,
    EUL5_QPP_STATS QPP,
    EUL5_EXPRESSIONS EXP
    WHERE
    OBJ.OBJ_NAME = <Folder Name>
    AND OBJ.OBJ_ID = EXP.IT_OBJ_ID
    AND INSTR(QPP.QS_OBJECT_USE_KEY,OBJ.OBJ_ID) > 0
    AND INSTR(EUL5_GET_ITEM_NAME(QPP.QS_ID),EXP.EXP_ID) > 0
    GROUP BY
    OBJ.OBJ_NAME,
    EXP.EXP_NAME;
    Script 2:
    =========
    This one examines the whole EUL and displays a count of the number of times a worksheet has been run by folder. It also shows the date and time of the last run. This one is useful to determine the most and / or least popular worksheets. Adjusting the ORDER BY clause can throw up some interesting results.
    SELECT
    OBJ.OBJ_NAME FOLDER,
    MAX(QPP.QS_CREATED_DATE) LAST_DATE,
    QPP.QS_DOC_OWNER OWNER,
    QPP.QS_DOC_NAME WORKBOOK_NAME,
    QPP.QS_DOC_DETAILS SHEET_NAME,
    COUNT(QPP.QS_ID) USAGE
    FROM
    DRAKE.EUL5_OBJS OBJ,
    DRAKE.EUL5_QPP_STATS QPP
    WHERE
    INSTR(QPP.QS_OBJECT_USE_KEY,OBJ.OBJ_ID) > 0
    GROUP BY
    OBJ.OBJ_NAME,
    QPP.QS_DOC_OWNER,
    QPP.QS_DOC_DETAILS,
    QPP.QS_DOC_NAME
    ORDER BY
    OBJ.OBJ_NAME,
    COUNT(QPP.QS_ID) DESC;
    I'm considering a blog entry of useful EUL scripts. Anyone interested? Yes - either reply here or drop me a line.
    Best wishes
    Michael

  • Finding which table generated how much redo

    I'm wondering if we can find from any view that during this period a particular table generated how much amount of redo log , other than logminer ?
    We have a particular application and want to know which tables are generating most of the redo.

    from asktom
    see
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:477221446020
    and
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:366018048216
    Nologging only affects very very specific operations. For exmaple, from the
    alter index syntax statement in the SQL reference:
    LOGGING|NOLOGGING
    LOGGING|NOLOGGING specifies that subsequent Direct Loader (SQL*Loader) and
    direct-load INSERT operations against a nonpartitioned index, a range or hash
    index partition, or all partitions or subpartitions of a composite-partitioned
    index will be logged (LOGGING) or not logged (NOLOGGING) in the redo log file.
    In NOLOGGING mode, data is modified with minimal logging (to mark new extents
    invalid and to record dictionary changes). When applied during media recovery,
    the extent invalidation records mark a range of blocks as logically corrupt,
    because the redo data is not logged. Therefore, if you cannot afford to lose
    this index, you must take a backup after the operation in NOLOGGING mode.
    If the database is run in ARCHIVELOG mode, media recovery from a backup taken
    before an operation in LOGGING mode will re-create the index. However, media
    recovery from a backup taken before an operation in NOLOGGING mode will not
    re-create the index.
    An index segment can have logging attributes different from those of the base
    table and different from those of other index segments for the same base table.
    That also explains why the truncate above generated redo -- The statement
    "minimal logging (to mark new extents invalid and to record dictionary
    changes)." explains where that redo comes from. The blocks that were truncated
    were not logged HOWEVER the changes to the data dictionary itself were.
    .

  • How to check from which table data is picking by datasource 0CDCY_ACT_ATTR

    Hi Experts,
    Could you please help me in finding out of the table from which datasource 0CDCY_ACT_ATTR is extracting.
    As per my knowledge is should be extract from tables(infotypes) HRP5135 - 5141.If i am wrong please correct me.
    Issue : My extractor(0cdcy_ACT_ATTR) is bringing wrong ACT_TYPE (Eg :5010) where as in table HRP5141 for that particular OBJID it is 9180( different).
    Please help me why my extractor is bringing ACT_TYPE 5010.
    This standard datasource and using Function Module :  RCF_BIW_GET_ACTIVITY, How can i check from which table it is picking the data
    Thanks in Advanve
    Sree

    Hi Sree,
    In RSA3 on the first screen, you have the option to start debugging by marking the debug check box, once you put all the selections, click on execute and it will go to debug mode, then keep on pressing F5. It will debug your code line by line, then you can check for all the select statements.
    Or once the debugging is started you will have the option to put break point on all the select statements in one shot, you can get in touch with your ABAP team.
    Regards,
    Durgesh.
    Edited by: Durgesh Gandewar on Jul 24, 2011 8:20 PM

  • How table data is stored in Oracle db?

    Hi,
    I would like to know the, order in which the data is store in oracle.
    say for e.g.
    If I type
    select * from emp; -- with out order by
    I get record in some order
    I would like know the order in which oracle stores the data, say if I insert rec 1, rec 2 .. rec n, does oracle stores in same order.
    select * from table;
    rec 1
    rec 2
    rec 3
    Is it possible that every time I fire this query(with out any order by clause) the order may differ?

    No particular order.
    If your query does not specify ORDER BY the actual order of the result is UNDEFINED.
    In other words, if you need the rows to be ordered use an order by.

  • How to find which table is not being used ?

    Hi,
    I am in need of releasing space from the common schema we have. i have been permitted to drop the tables which has not been used for the last three months.
    Can anyone please suggest how to find the tables that has not been used for a given amount of time.
    Thanks and Regards.
    Rajib

    i have been permitted to drop the tables which has not been used for the last three months.Can I just chip in an observation on this premise? It's not unusual for systems to have processes that run quarterly or even annually. You need to be very careful about dropping "unused" tables - you might just kill your organisations end of year reporting system.
    Is buying more disk space really not an option?
    Cheers, APC

  • Find which tables are linked to this one via foreign keys

    Hi, I need to drop & recreate a table, but this table is referenced by other tables via foreign key constraints.
    1. Is there a query I can run to find those tables (the ones referencing this one) ?
    2. What is the standard way to drop & recreate this table being referenced by others?

    1) You can try the following query:
    select r.owner, r.table_name
    from user_constraints r, user_constraints o
    where r.r_owner = o.owner and r.r_constraint_name = o.constraint_name
    and o.constraint_type in ('P','U') and r.constraint_type = 'R'
    and o.table_name = 'DEPT'
    2) To drop tables with references you can also use drop table cascade constraints,
    which will also drop constraints from tables:
    [email protected]> drop table dept;
    drop table dept
    ERROR at line 1:
    ORA-02449: unique/primary keys in table referenced by foreign keys
    [email protected]> drop table dept cascade constraints;
    Table dropped.
    Another way is to prepare a script which will remove the tables in proper order.
    Best Regards
    Krystian Zieja / mob

  • Pl/sql block reading reading table data from single point in time

    I am trying to figure out whether several cursors within a PL/SQL block are executed from within a Single Point In Time, and thus do not see any updates to tables made by other processes or procedures running at the same time.
    The reason I am asking is since I have a block of code making some data extraction, with some initial Sanity Checks before the code executes. However, if some other procedure would be modifying the data in between, then the Sanity Check is invalid. So I am basically trying to figure out if there is some read consistency within a PL/SQL, preventing updates from other processes to be seen.
    Anyone having an idea?.
    BR,
    Cenk

    "Transaction-Level Read Consistency
    Oracle also offers the option of enforcing transaction-level read consistency. When a transaction runs in serializable mode, all data accesses reflect the state of the database as of the time the transaction began. *This means that the data seen by all queries within the same transaction is consistent with respect to a single point in time, except that queries made by a serializable transaction do see changes made by the transaction itself*. Transaction-level read consistency produces repeatable reads and does not expose a query to phantoms."
    http://www.oracle.com/pls/db102/search?remark=quick_search&word=read+consistency&tab_id=&format=ranked

Maybe you are looking for

  • Iview Isolation Method property

    Hi, The page contains 6 iviews, I created new iview and assigned to this page if refresh this iview complete page refreshing, I don’t want this complete page refreshing only iview should refresh, for this reason I set isolation method property of ivi

  • Generic Connectivity for 64-bit 10gR2 on Windows

    I want to create a database link from a Windows oracle database to SQL Server 2005. The obvious solution seemed to be generic connectivity using HSODBC. However, I don't have HDODBC.EXE in my 64-bit oracle home. Doing some investigation, it seems tha

  • ORA-00939 when creating XML table with Virtual Columns

    Getting error on creating table with VIRTUAL COLUMNS: Error at Command Line:4 Column:31 Error report: SQL Error: ORA-00939: too many arguments for function 00939. 00000 - "too many arguments for function" Without VIRTUAL COLUMNS works fine. Where to

  • Ideacentre A310

    Help please anyone!  Where can I get a replacement wireless keyboard for my IdeaCentre A310 in the UK? Dog has eaten it!! Product number A310-K BT.  Thanks in advance to anyone who can help.

  • I am trying to get on Facebook Farmville and It had said I'm missing a plugin ??

    I am using Firefox as my default and I type Facebook then I go to Farmville and wait for it to load then it says If your game does not load within 10 seconds you may need to upgrade your flash version did that then I missing a plugin so i update the