How to find same field name from all tables?

Dear All,
I want to find those tables that contain a field name, say COMPANY_CODE, from all user tables. How can I do that by writing SQL?
Many thanks,
Andrew

SELECT table_name
  FROM user_tab_columns
WHERE column_name = 'COMPANY_CODE'Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • Finding a column name from all tables

    i have 85 tables in my user, i forget a column name and its table name. how to find that particular column amongst all tables i have.

    hi
    You can use User_tab_columns or All_tab_columns
    SQL>Select Table_Name,Column_Name From user_tab_columns
    where lower(table_name) like '%emp%' or
    lower(column_name) like '%dept%'
    Khurram Siddiqui
    [email protected]
    Message was edited by:
    pcbyte12

  • How to find the form name  from VA02 T.code

    how to find the form name  from VA02 T.code

    Hi Rajyam,
    I guess you are looking out for the formname which prints sales related documents.
    If this is what you want,then go to the T-code NACE and select the option K1Sales activities and click on the Output Types button on the top.The new window has all the types of Output types listed.Select the most appropriate and double click on the Processing routines button in the left side screen.
    The new window lists the program names and the forms associated with that output type.
    In case you have any further clarifications,do let me know.
    Regards,
    Puneet Jhari.

  • How to find the dsn name from an *.rpd file provided?

    How to find the dsn name from an *.rpd file provided? All the ODBC details which would require to run your dashboard.

    Hi
    DSN name is not a part of .rpd file. So There is no information about DSN name in .rpd file.
    Thanks
    Siddhartha P

  • Discoverer Report: How to find Business Area name from Report Name.

    Hi
    I opened a report in Disco Desktop 4 -> Resonsibiolity --> Report Name.
    So I know Report name but don’t know which Business Area it belongs to.
    How to find Business Area Name from Report Name?
    Cheers
    Vijay

    Hi,
    There is no relationship between reports and business areas. Each report can be built from many folders. Each folder can be in many business areas.
    However you can try the following SQL which may give you the result you want for an v5 EUL. You will have to modify for Discoverer 4 EUL:
    select distinct doc_name, obj.obj_name folder_name, bas.ba_name
    from eul_us.eul5_documents doc
    , eul_us.eul5_elem_xrefs xref
    , eul_us.eul5_expressions exp
    , eul_us.eul5_objs obj
    , eul_us.eul5_ba_obj_links bol
    , eul_us.eul5_bas bas
    where xref.ex_from_id = doc.doc_id
    and doc.doc_name = &your_report
    and xref.ex_to_id = exp.exp_id
    and obj.obj_id = exp.it_obj_id
    and bol.bol_obj_id = obj.obj_id
    and bas.ba_id = bol.bol_ba_id
    Rod West

  • How to find a metachain name from local process chain id or name

    how to find a metachain name from local process chain id or name

    Hi Dwarakanath,
    Please post your query in the correct topic space in SCN.  For help, see this document:
    Find Topic Spaces on SCN (Forums)
    Thanks,
    Kristen

  • How to get only column names from different tables as single table columns

    Hi All,
       I have one requirement in which we want only column names from different tables.
    for example :
     I have three tables T1 ,T2, T3 having
      col1 clo2 clo3 -->  T1 , 
      col3 col5 ,clo6 --> T2 ,
      Clo6 col8 col9 --> T3
    columns i want to get only all  Column names from all table as single Resultset not any data from that how can i get that empty resultset 
    because this empty result i want to bind in datagridview(front end) as Empty resultset 
    Please tell me anyways to do this
    Niraj Sevalkar

    If I understand you want an empty result set, just with metadata. SET FMTONLY do the trick:
    SET FMTONLY ON
    SELECT Col1, Col2, Col3, ....., Coln
    FROM
    T1 CROSS JOIN T2 CROSS JOIN T3
    SET FMTONLY OFF
    Another alternative is to include an imposible contition
    SELECT Col1, Col2, Col3, ....., Coln
    FROM
    T1 CROSS JOIN T2 CROSS JOIN T3
    WHERE 1 = 0
    If you are using a SqlDataAdapter in your client application. You can use the FillSchema method. the select command may be any select statement that returns the columns you want. Under the covers FillSchema will call SET FMTONLY ON.
    If you are using SqlCommand.ExecuteReader you can pass SchemaOnly to CommandBehavior argument. SET FMTONLY ON is called under the covers. Again the select command may be any select statement that returns the columns you want.
    "No darás tropezón ni desatino que no te haga adelantar camino" Bernardo Balbuena

  • How to get the field names of a table

    hi all,
    i need to get all field names of a table. here i dont need any data. i need only field names.
    initially i used this query, select * from tname;
    the problem is if table have 1000 records, all records will be in memory.
    how to get this one.
    regards
    pavan.

    hi all,
    thanks a lot. the query is working.
    initially i given this query
    select column_name from user_tab_columns where table_name='mytable';
    but no rows selected.
    and i tried with this,
    select column_name from user_tab_columns where table_name='MYTABLE';
    this is working fine.
    thanks
    pavan.

  • How to find out the name of a table?

    Hi
    How can I find out the name of a table which doesn't have a record history?
    Regards
    Rahman

    No direct way to know the tables. What you will find on the ABout this page link are the View Object (similar to record sets), Entity objects, controller and Application module. Generally EO is based on a table or the VO can be based on the query which you can find the corresponding xml file. But a button action might be calling a method in AM or CO which in turn call some wrapper method to interact with database. So nothing straight forward. You will have to analyze the all page related code objects.
    They are specific to OA framework and if you are not aware about them, better go through the initial chapters of OAF dev guide.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to retrieve the Field Name of a Table

    Hi guys,
    I'm trying to retrieve the field name of a table in java, but i don't know how to do it. Could somebody help me?Let say i have a table name Itemmaster, then
    i want to retrieve its field and display to dos prompt.
    Example :
    Item No.
    Description
    Quantity
    It is possible to retrieve the fields?
    What could be the possible command in java using packages Java.sql.*?
    Thanks in advanced...
    Best regards,
    Dharry

    The ResultSet class, which is how query results are returned in JDBC, has methods to get at the metadata for the table queried, including column names:
    ResultSet resultSet=statement.executeQuery("select * from table");
    resultSetMetadata=resultSet.getMetaData();
    resultSetMetadata.getColumnLabel(column+1);

  • Import tables using same file name for all tables

    hi,
    We are using oracle 11.2.0.3.0, we have taken export of multiple tables in schema, unfortunately in exp command we have mention same file name for all the tables, now it has created one file for all export but the size of that file shows that all the tables included in it , when we try to import the tables only last table mention in export command is imported for other tables it hangs, example of code show below.
    Is there any way to import the remaining tables.
    exp system file =exp05042013.dmp tables=gr.table1
    exp system file =exp05042013.dmp tables=gr.table2
    exp system file =exp05042013.dmp tables=gr.table3

    Hi,
    You can use as :
    exp username@database tables=table1,table2 file=tabledata.dmpDid you have any RMAN full backup?
    Why you are not recover crash database?
    Mahir

  • How to find the field name of variable system information on SAP B1

    Hi All,
    I recently wanted to create a simple SQL query to list all ITEM MASTER DATE where the weight is blank.  This is so i can get a list of all items with the weight information missing from the system to investigate. 
    It turns out the weight field within the SALES DATA tab is a system variable.  When i pull the OITM table up within the query generator i can not identify where this variable name come up without guessing which can give me the wrong information.
    Can someone point me into the direction on how to assisocate variable to a field name within SAP B1. This is also another problem if i wanted to display variable within Crystal report layout.
    Regards

    Hi Nick Dang,
    Try This
    SELECT T0.[ItemCode], T0.[ItemName], T0.[SalUnitMsr], T0.[SHeight1],  T0.[SWidth1], T0.[SLength1], T0.[SVolume], T0.[SWeight1] FROM OITM T0 WHERE T0.[ItemCode] =[%0]
    Thanks,
    Srujal Patel

  • How to find a query name from report name

    I have a report in my system with the name AQICMM==========P2============ . I believe this was created from a query. How to find the query corresponding to this report ? I need to change the logic for certain columns of the report. How to know if this was created from SQVI or SQ01 or any other transaction.
    THanks.

    Found it..Query name is P2. It was in a different query area..Standard area and not custom area where I was initially looking at.
    Edited by: Shareen Hegde on Aug 22, 2008 5:14 PM

  • Finding same column name from multiple database tables

    I am needing to find all tables in a database that contain the same column. ie: which tables in database A have col_a in it.
    Is it possible to do a sql code to qry all of this?
    Thanks

    No, Ignacio did not, at least, not really. ;)
    The usage of ALL_TAB_COLUMNS only has info for tables which the actual user has access to.
    If you need to be sure that you search each and every table, you have to use DBA_TAB_COLUMNS (or the connected user must be a super hero...).
    Just wanted to point that out.
    Regards,
    Guido

  • How to find the API name from the Integrator

    I am looking in a WebADI build solution.
    1) I need to find the API name, which is used by the Custom integrator to validate and insert the data into custom table.
    Can we find the source where WebADI integrator stores the API name.
    Please help me out in this.

    Satya,
    You are right that we are not supposed to change the Oracle supplied files. But some times you really don't have any other option. Some times Oracle support them selves ask you to change their programs.
    Anyway the Concurrent program definition is stored in BNE_PARAM_LISTS_B, BNE_PARAM_LISTS_TL, BNE_PARAM_LIST_ITEMS and BNE_ATTRIBUTES table. For a concurrent program with out any parameter there will be 6 records in BNE_PARAM_LISTS_ITEMS and BNE_ATTRIBUTES table.
    These racords are
    Application, Program, Description, Run date , Sub Request , End of Concurrent Request Parameters and Rest of parameters default.
    Look at these tables and you will know how Oracle has defined these Concurrent programs.
    HTH
    Dinesh

Maybe you are looking for