To find Data in Many tables

Hi
I need what tables have a Data , eg : 'ABCDE' , How can I to do it, Search in all Tables and show What Tables and What Columns ?
tks

declare
  cursor c1 in
    select table_name,
           column_name
      from user_tab_cols
     where data_type = 'VARCHAR2';
  vSQL    varchar2(1000);
  vCnt    number := 0;
begin
  for c1_rec in c1 loop
    vSQL := 'Select Count(*) From '||c1_rec.table_name||' Where '||c1_rec.column_name'||' = '||'''ABCDE''';
    execute immediate vSQL into vCnt;
    if vCnt > 0 then
      dbms_output.put_line('Table: '||c1_rec.table_name||' Column: '||c1_rec.column_name);
    end if;
  end loop;
end;note: untested

Similar Messages

  • To stop Running the Report when we dont find data in the table

    I am running a 6i report and this report fetches data from custom table.
    I need to check whether data exists in the custom table in the After parameter form and if doesnt return any data then i need to Stop the report execution and write a message without raising any exceptions or errors
    note: we tried with srw.program_abort ---- it stops the report but it returns an exception
    Thanks

    Here the tricky is
    if we don't have last month data we should not go the data model. The data model query will run regardless the previous month data.
    we are trying to find the previous month data in after parameter form. if it is not there we want to stop the report there itself it should not go to layouut or data model.
    how to achive this one?
    we try to terminate the report through program_abort but it is raising an exception

  • Need to download data of many tables in excel.

    Hi
          I have a requirement to download the data of more then one database tables into one excel sheet.
          Can any one let me know how i can doe this?
    WBRS,
    Amar

    Amar,
           (1)  First  get the data of different tables into seperate internal table.
           (2) Move the all internal table in one final internl table.
           (3) Using 'WS_DOWNLOAD' Fm you can download the final internal table in excel format.
    I will have  send if you need a sample code.
    You can search lots of stuff in SDN, before posting ....
    Thanks,
    Veera

  • Unable to find data in s677 table

    Hi I had maintained planned data in md63 for month 1-5 of 2012 but unable to find it in table s677, help.

    Hi Allen,
    Referring to replies:
    1. You entered values directly in MD63
    2. No updates in table-S677 or PBIM.
    Let me clarify few things.
    SIS-S677 is custom info structure (Not a standard SIS) designed to your requirement. That means you're working on S&OP Flexible Planning module.
    So as a prerequisite to this module you must maintain below mix of Config & master data:
    1. Sales Info Structure i.e. S677 with update groups & rules. To capture any sales history.
    2. Planning Type: It's config and Planning type defines the content and the layout of the lines in the planning table.
    3. Planning hierarchy: It's a Master data and is a combination of characteristic values based on the characteristics of one information structure.
    4. Planning Table: It's the place where a Planning is done.
    After all above set-up, you would be able to enter in Planning Table for planning the products.
    Steps for Planning/Forecasting:
    1. Based on your SIS Update groups & Rules, a S677 will be updated with sales quantities with Version-00 and same will be used to calculate forecast.
    2. Using forecast model setup, a forecasting can be run in Planning Table for a particular product.
    3. Forecast/planning values then will be saved in Planning Table. Once you save these values & come out of Planning Table, these values will be updated in S677 with version-A00.
    4. Then you need to transfer Forecast/Planning values to Demand Management from Planning Table.
    5. Check if values can be seen in Demand Management (MD63). If yes, a seperate SAP standard table-PBIM, PBHI etc. will be updated. These values in MD63 are called as Planned Ind Requirement (PIR).
    6. Once PIR can be seen in MD63, you can run MRP Run.
    7. Once MRP finished, you can go-ahead with further processing.
    This is how the complete scenario is. Check if it's okay and then revert if any further issue.
    Regards,
    Anup

  • How to find data's from table whose sum=given input.

    Hi all,
    how to find values whose sum=given value.
    i have a master. table
    master table
    name amount
    a 1000
    b 6000
    c 2000
    d 1500
    input amount=4500 (may change);
    how to get name from master table whose sum(amount)=4500;
    i.e) a,c,d as output.

    Hi,
    I realy like the approach you made.
    But it is not realy scalable, as you probably know already.
    I tried the following:
    WITH
    master_table as
    select 'a' name, 1000 amount from dual union all
    select 'b',      700 from dual union all
    select 'c',      2000 from dual union all
    select 'd',      300 from dual union all
    select 'e',      1000 from dual union all
    select 'f',      1200 from dual union all
    select 'g',      2300 from dual union all
    select 'h',      500 from dual union all
    select 'i',      400 from dual union all
    select 'j',      600 from dual union all
    select 'k',      700 from dual union all
    select 'l',      400 from dual union all
    select 'm',      500 from dual union all
    select 'n',      600 from dual union all
    select 'o',      700 from dual union all
    select 'p',      800 from dual union all
    select 'q',      900 from dual union all
    select 'r',      1000 from dual union all
    select 's',      1700 from dual union all
    select 't',      1400 from dual
    ,got_name_list     AS
         SELECT     LTRIM ( SYS_CONNECT_BY_PATH (name, ',')
                    )                         AS name_list
         ,     SYS_CONNECT_BY_PATH (amount, '+')     AS amount_list
         FROM     master_table
         CONNECT BY     name     > PRIOR name
              AND     amount     < :target_amount
    SELECT     name_list, amount_list
    FROM     got_name_list
    WHERE     XMLQUERY ( (amount_list)
               RETURNING CONTENT
               ).getnumberval ()     = :target_amount
    ;And indead I received a solution. But it toke 788 seconds.
    I think that if you want to use this with more rows you have to find a PL/SQL solution.
    Regards
    Peter

  • ODSI csv file creation from a data service that read data from many tables.

    Hi,
    We have few dataservices running in our enviroment. Now we have a requirement to save the data as CSV files on demand. My question, can we do this using ODSI 10gR3?
    I know we can read the csv file and create a physical data service. We have a compleded a use case that data comes in CSV file and saved to Oracle table when required.
    Now how to do the reverse is my question. I am not findind any help in documents for this. I have opend a case with Oracle support for this, looks like they are not understading and taking it as a issue in ODSI 10gR3.
    Please help.
    Thanks in advance.
    Rahul

    we have a requirement to save the data as CSV files on demand. My question, can we do this using ODSI 10gR3? Yes. But you have to write the java code to do it. Create a class with a static method that takes two arguments - an array of XmlObject (or of the specific type that extends XmlObject that is created by compiling the schema) and a filename - and writes the values of the children of the array elements into your CSV file.
    Put that class in a jar and put the jar in DSP-INF/lib, then create a physical datasource -> Java from that method, make sure you specify that resulting datasource procedure is a libraryProcedure.
    So you'll have to do a little homework on ODSI Java Functions with XmlObject arguments.
    - Mike

  • ASE 15.7 how to find data entry using table page nr

    Hi,
    I am looking for a dbcc () to get data when I know page number from a table
    Thank you

    Hi Isabella,
    What your asking is not supported by SAP .. although you can achieve the result by using dbcc page:
    http://wiki.scn.sap.com/wiki/display/SYBASE/DBCC+page
    The only problem is that the data is in binary format so you have to format it by yourself to a readable format.
    Regards,
    Adam

  • Can i change or modify or insert the data in standard tables

    hi gurus
    can i change /modify/insert the data in standard tables
    witout using module pools
    plz send the  progem lines also
    it ll be very helpful to me
    thank you
    kals.

    Hi Kalyan,
    It is not advisable to update standard tables directly or through your own module pool programs also.  The reasons are,
    1.  It is difficult to find out how many tables are updated through the transaction.  if we leave one table also as Mr.Andrew said data integrity will be lost.
    2.  Authorization objects and profiles will be totally bypassed if data is inserted through custom programs.
    3.  Complete data validation is not possible.  There are certain validations that are executed through code and appropriate errors and warnings are shown in the transactions.  If we insert data directly to the tables anything can be inserted into the table field violating all the validations unless we have field level check constraints on the tables at database level.
    4.  User Exits and BADIs that are implemented for specific business requirements and checks will not function on the data.
    5.  Update & Transaction locks will not work properly.
    Due to above reasons, definitely you should avoid updating standard tables directly.
    There are many tools such as LSMW Recordings, BDCs, BAPIs, IDOCs, Upload Interfaces available in SAP through which bulk data can be updated without using relevant transactions.
    You can collect data from end users in text or excel sheets or through custom programs in required format and upload at once through above mentioned tools.
    Regards,
    Hema

  • How to refine data in Aggregate tables  in Oracle BI

    Hello!
    How to refine data in aggregates tables (created by "create aggregates ..." statement) after the data in corresponding database tables was updated?
    It is unable to use the "delete aggregates" statement and then "create aggregates" again, because "delete aggregates" eliminates all aggregates in a model, but there are several aggregates in our model, that are intended for refining in different time moments and periods.
    Thanks

    903830 wrote:
    Hi folks,
    suppose we have table emp01, have 10 records & we create another table emp02 as
    create table emp02 as select * from emp01;
    now both the table have identical data.
    How to find "data" in two tables are identical?Why wouldn't they be identical? You've just created one table as a copy of the other. They are identical in data terms.

  • Finding greatest value of date in a table

    Hi experts,
    I have many dates in an internal table.How to find min and max dates of these.
    Is there any FM or i have to write logic.
    Please help.
    Krishan

    Hi Krishan,
    Adding to pavan ans....
    SORT itab BY date.
    DESCRIBE TABLE itab LINES l_lines. "Get total number of lines in itab.
    READ TABLE itab INTO wa INDEX 1 TRANSPORTING date. "Read first entry
    Here wa-date have Min date value.
    READ TABLE itab INTO wa INDEX l_lines TRANSPORTING date. "Read last entry
    Here wa-date Have Max date value.
    Thanks,
    Vinod.

  • Can not find product , sku attributes data in database table

    Hi there,
    I find it really strange to find data in database related to product and sku. I set up the commerce reference store and store is up and running fine. Catalog is fine too. I am not able to find data related to sku attributes in database.
    I have a product_id xprod2511 which has 11 child skus such as xsku2511_1, xsku2511_2 and so on. sku xsku2511_1 is blue color and size 4. When I search for this two sku attributes (color and size) information in dcs_sku_attr table with sku_id as xsku2511_1, no rows returned. In fact, I looked into few other sku tables but I am not able to find the information about color and size of a sku in any database table.
    this is the query I am running:
    select * from dcs_sku_attr where sku_id = 'xsku2511_1'
    Can someone please let me know the table name where this information regarding color and size resides in?
    Thanks a lot.

    In dyn/admin If you try and view the definition file of ProductCatalog repository, then under sku item descriptor you would see the color and size property which would be under some table tag, that table tag table name should be the table holding these values.
    the other question(may be silly) is that I hope that you are executing sql in correct schema, that is cata or catb schema (select * from catA.dcs_sku_attr) where the actual product catalog data resides.

  • How-To Find the R/3 Table Name for a BW Data Source

    Hi there,
      Please advice how can I find the respective table name in R/3 for a particular BW DataSource ?
      P/S : I would like a technical how-to instead of referring the table names at HELP.SAP.COM
      For instance, for my Standard Business Content Info Cube 0CCA_C03(CO-OM-CCA: Statistical Key Figures) which extracts from BW Data Source: 0CO_OM_CCA_4
      My question is, how can I find out which specific tables in SAP R/3 is this Data Source pulling the data from ?

    Hi Dinesh,
       Data Source: 0CO_OM_CCA_4
       1) In my R/3, I ran SE16 : Table -> ROOSOURCE
       2) OLTPSOURCE -> 0CO_OM_CCA_4
       3) EXMETHOD = F1
         (Hence, I assume the Extraction Method is a Function Module)
       4) So, Function Module = BWOM_RS_GET_CTRSTA
       5) Run SE37 in R/3
          How do I find out the specific tables in this Function Module ?
          Would you please list them for me, so I can further refer to the individual tables ?

  • In which table in CRM can i find data in business activity details?

    Hi
    In which table in CRM can i find data entered in business activity details in opportunity transaction.
    Please advice .
    Thanks,
    Vaishnavi

    found the table name CRMD_Activity_H

  • 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........

  • Complicated Question (see pdf): Use data from one table to find the same data in a second table and take other data from that table and place it in a third table. :)

    I don't even know if this is posible.
    I'm using iwork '09 
    View PDF

    I hope I can clarify:
    For our purposes here:
    Table 1 = "Step 2 - Product Sizes"
    Table 2 = "Option id Master"
    Table 3 = "Export - Product Info"
    Table 1:
    The user would enter values for "productcode," "Horz," and "Vert"
    "Size" would auto fill based on values in Horiz and Vert (I have this taken care of already).
    Table 2: This is a completely static table that I want to search against. - Data from other tables in the doc does not alter or change the data in this doc.
    We just want to look at table 2. Find the existing value in "table 2 : size" column that matches the "table 1 : size" column  and then pull the "optionids" and "productprice" from that row.
    Can the value from "Table 1 : Size" be used as a search term in "Table 2 : Size?"
    Table 3: The user does not enter any values on this table. 
    "productcode" is pulled from table 1 - "Table 1 :: A5" = "Table 3 :: A5"
    "optionids" and "productprice" are pulled from Table 2 columns "D" and "E" - however we do not know which Table 2 row it is pulling from until we enter data in Table 1.
    As I'm writing this I'm realizing that
    A. this is probably really confusing to you.
    B. this may be impossible inside of numbers.
    If you have some other method that would facilitate the same out come but be structured differently please let me know.
    --- maybe to help you understand further what I am doing here is my current workflow:
    I record the size of a piece of art.
    Then I manually go to my "Option id Master" and find the same size.
    I then copy the corresponding "optionids" and "productprice" cells. (these options control the prices displayed on my website)
    I got to my "Export - Product Info" table and paste the values in the corresponding cells.
    I was hoping to automate this as it takes a long time when you have hundreds of products.
    Thanks for the help!

Maybe you are looking for

  • Some of the PDF doccuments are not open

    Some of the PDF doccuments are not open

  • There's no way a can access to iSync preferences!!!

    Since i bought The Windows Mobile HTC, i need to enable the synchronization on my Mac, and if doing so i need to go to the iSync prefernces. I don't know if it's supposed to do that, but my iSync doesn't let me go the the iSync preferences... is it n

  • WorkFlow Remedy Reports

    Hi, Are there any SRM Workflow Remedy reports like ones for SRM (Z_SC_STATUS_CHECK_2/3/4/5/6/7) Also any tips to use them is appreciated. Example We have workflows that in BBP_PD show waiting approval but have followon documents. Thank you Nikhil FYI

  • Openbox as gnome window manager doesn't work

    So, this is my first time with arch, and I have some experience with Ubuntu so I installed the gnome winow manager to start. It looks fine but I like some themes and how openbox looks/works more. I decided saw in a wiki that you can make it the windo

  • Great device but is it THE business tool? Nope, far from it...

    Hi, I just need to vent so please bear with me. Many of the below have been raised in these forums but I'm just amazed at how some of these basic features are not present. I've been a Windows Mobile device user for several years and whilst it's clunk