Finding a column in the database tables

Hi,
I am new in databases and I just started on a project which was already half done.
Sometimes I find it difficult to find out where a column is, i.e. in which table is?
Is there a query to find it out?
For e.g, there are 100 tables. I want to find a column "Description". I want to know in which table the column "Description" is.
Any help would be appreciated.

If you are connect to the schema where you want to search use, user_tab_columns with the following query:
SELECT table_name,column_name FROM user_tab_columns
WHERE column_name like '%STRING%'
ORDER BY 1;
If you want to find out in all the schemas (entire database), use dba_tab_columns.
Jaffar

Similar Messages

  • How to find the database table behind the xtags  varibles?

    if in xtags we find that some varibles are not having the right data coming from xml -> database tables so how can we find out the names of database table behind it .
    <!-- <xtags:variable id="msds" context="<%=specs%>" select="//header/msds"/>
    <a href="/MSDS/<%=msds%> target="#">MSDS</a>
    -->
    now how to find the database table and the column name of database table from which the value of id msds is coming
    Here they have stored the name of pdf file . from this code pdf file is displayed

    Hi,
    Thanks for your response. It is PM related.  When I run a T Code - IK18,  the field Total Counter Reading field appears. I am looking for that particular fields actual table name and field name.  I think I have found it in IMGR table. Now I want to get IMRG-READG in my report, but there is no common fields in neither MKPF or MSEG table. So what can I do to connect IMRG table with either of them ?

  • How to find out that the database table is empty

    Hello all,
    How to find out in ABAP in the best performant way, that the database table is empty. The table could have several milions of records or be empty. SELECT count( * )  looks to me as not the best way.
    Kind regards
    Radim Benek
    Moderator message: FAQ, please search for previous discussions of similar topics.
    example: "SELECT SINGLE" vs. "SELECT UP TO 1 ROWS"
    Moderator message: Please Read before Posting in the Performance and Tuning Forum
    Edited by: Thomas Zloch on Aug 11, 2011 5:06 PM

    Hi,
    One approach is:
    check lt_mytable is initial.
    This will be true if there are no lines.
    Another:
    describe table lt_mytable lines lv_count
    if lv_count = 0.
    "Empty
    Thanks.
    Anitha a

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • [Forum FAQ] How to configure a Data Driven Subscription which get multi-value parameters from one column of a database table?

    Introduction
    In SQL Server Reporting Services, we can define a mapping between the fields that are returned in the query to specific delivery options and to report parameters in a data-driven subscription.
    For a report with a parameter (such as YEAR) that allow multiple values, when creating a data-driven subscription, how can we pass a record like below to show correct data (data for year 2012, 2013 and 2014).
    EmailAddress                             Parameter                      
    Comment
    [email protected]              2012,2013,2014               NULL
    In this article, I will demonstrate how to configure a Data Driven Subscription which get multi-value parameters from one column of a database table
    Workaround
    Generally, if we pass the “Parameter” column to report directly in the step 5 when creating data-driven subscription.
    The value “2012,2013,2014” will be regarded as a single value, Reporting Services will use “2012,2013,2014” to filter data. However, there are no any records that YEAR filed equal to “2012,2013,2014”, and we will get an error when the subscription executed
    on the log. (C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles)
    Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException: Default value or value provided for the report parameter 'Name' is not a valid value.
    This means that there is no such a value on parameter’s available value list, this is an invalid parameter value. If we change the parameter records like below.
    EmailAddress                        Parameter             Comment
    [email protected]         2012                     NULL
    [email protected]         2013                     NULL
    [email protected]         2014                     NULL
    In this case, Reporting Services will generate 3 reports for one data-driven subscription. Each report for only one year which cannot fit the requirement obviously.
    Currently, there is no a solution to solve this issue. The workaround for it is that create two report, one is used for view report for end users, another one is used for create data-driven subscription.
    On the report that used create data-driven subscription, uncheck “Allow multiple values” option for the parameter, do not specify and available values and default values for this parameter. Then change the Filter
    From
    Expression:[ParameterName]
    Operator   :In
    Value         :[@ParameterName]
    To
    Expression:[ParameterName]
    Operator   :In
    Value         :Split(Parameters!ParameterName.Value,",")
    In this case, we can specify a value like "2012,2013,2014" from database to the data-driven subscription.
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    For every Auftrag, there are multiple Position entries.
    Rest of the blocks don't seems to have any relation.
    So you can check this code to see how internal table lt_str is built whose first 3 fields have data contained in Auftrag, and next 3 fields have Position data. The structure is flat, assuming that every Position record is related to preceding Auftrag.
    Try out this snippet.
    DATA lt_data TYPE TABLE OF string.
    DATA lv_data TYPE string.
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename = 'C:\temp\test.txt'
      CHANGING
        data_tab = lt_data
      EXCEPTIONS
        OTHERS   = 19.
    CHECK sy-subrc EQ 0.
    TYPES:
    BEGIN OF ty_str,
      a1 TYPE string,
      a2 TYPE string,
      a3 TYPE string,
      p1 TYPE string,
      p2 TYPE string,
      p3 TYPE string,
    END OF ty_str.
    DATA: lt_str TYPE TABLE OF ty_str,
          ls_str TYPE ty_str,
          lv_block TYPE string,
          lv_flag TYPE boolean.
    LOOP AT lt_data INTO lv_data.
      CASE lv_data.
        WHEN '[Version]' OR '[StdSatz]' OR '[Arbeitstag]' OR '[Pecunia]'
             OR '[Mita]' OR '[Kunde]' OR '[Auftrag]' OR '[Position]'.
          lv_block = lv_data.
          lv_flag = abap_false.
        WHEN OTHERS.
          lv_flag = abap_true.
      ENDCASE.
      CHECK lv_flag EQ abap_true.
      CASE lv_block.
        WHEN '[Auftrag]'.
          SPLIT lv_data AT ';' INTO ls_str-a1 ls_str-a2 ls_str-a3.
        WHEN '[Position]'.
          SPLIT lv_data AT ';' INTO ls_str-p1 ls_str-p2 ls_str-p3.
          APPEND ls_str TO lt_str.
      ENDCASE.
    ENDLOOP.

  • Hiding a column in the quote table

    Hello,
    Please i need to hide a column in the quote table (Oracle quoting: Quotes ). How can this be done ? I am not able to get the JSP pages to do the customization ? how to get the name of the JSP in order to get it from the server and modify it?
    Please reply ,
    Thanks,

    easiest way to find out the jsp to be modified.
    do the view source of the page, search for the item you want to hide and go back upwards in the file, you will find the jsp that renders the field.
    customize that jsp.
    Thanks
    Tapash

  • Need to insert into NVARCHAR2 column in a database table

    I need to insert into a table with column type NVARCHAR2(2000) in java.
    Cant use normal setString on that column. How can I do this using PreparedStatement in Java?

    The scenario is:
    I have to read a CSV file which contains a column in Urdu language, and show it on the JTable first.
    Then I have to import the JTable contents into a database table.
    Database Table structure is:
    CREATE TABLE IMPORT_TMP (
    ctype          VARCHAR2(3),
    urdu_name  NVARCHAR2(2000)
    );My java code which inserts into the database table is:
                    Vector dataVector = tableModel.getDataVector();
                    rowVector = (Vector) dataVector.get(row);
                  cType = "";
                    if (rowVector.get(INDEX_BANK) != null) {
                        cType = rowVector.get(INDEX_CTYPE).toString();
                    urduName = "";
                    if (rowVector.get(INDEX_URDU_NAME) != null) {
                        urduName = rowVector.get(INDEX_URDU_NAME).toString();
                    statementInsert.setString(1, cType);
                    statementInsert.setString(2, urduName);I also applied Renderer on the table column, my renderer class is:
    public class LangFontRenderer extends JLabel implements TableCellRenderer {
        private Font customFont;
        public LangFontRenderer(Font font) {
            super();
            customFont = font;
            System.out.println("font = " + font.getFontName());
            this.setFont(font);
        @Override
        public Component getTableCellRendererComponent(JTable table,
                Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            if (value != null) {
                if (value instanceof String) {
                    setText((String) value);
                    return this;
            return this;
        @Override
        public Font getFont() {
            return customFont;
        // overriding other methods for performance reasons only
        @Override
        public void invalidate() {
        @Override
        public boolean isOpaque() {
            return true;
        @Override
        public void repaint() {
        @Override
        public void revalidate() {
        @Override
        public void validate() {
    }I applied the renderer on the column as:
            TableColumn col = IATable.getColumnModel().getColumn(INDEX_URDU_NAME);
            LangFontRenderer langRenderer = new LangFontRenderer(new java.awt.Font("Urdu Naskh Asiatype", 0, 11));
            col.setCellRenderer(langRenderer);It does not give any error but when i query on the database table it does not show the column data in Urdu language.
    Also it does not show the correct value on JTable column, some un-identified symbols.
    Furthermore when I open the CSV file in notepad, it shows the correct language in that column, as I have installed the Urdu language and font on my system.

  • Two columns in the same table that are foreign keys to the same master key

    i want to create a table let say X, which have two columns that are foreign key that reference the same column in the master table, so does this count as bad database design.

    here is the full ddl for the two table, where in the second table there are two columns that represent the primary key and they are also two foreign keys to the same columns in the master table (items)
    Desc item table;
    Item_id
    Item_name
    Item_price
    Item_quantitiy
    Create table item_recommendation ( item_id varchar(20), recommended_item varchar(20),
    CONSTRAINT recom_primary PRIMARY KEY (item_id, recommended_item),
    CONSTRAINT F1 FOREIGN KEY (item_id) REFERENCES items(item_id), ),
    CONSTRAINT F2 FOREIGN KEY (recommended_item) REFERENCES items(item_id));

  • Update A Column In A Database Table.

    I am unable to update a column in a database table.
    For example; I have ten records in an EMP table without having any EMPNO. I want to UPDATE (insert) 10 different EMPNO in a table. How can I do it? All I know is that there are ten records in the table; this means that I cannot use a WHERE clause with different criteria for each row.
    Thanks.

    Try something like this
    SQL> select * from emp_1
      2  /
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    14 rows selected.
    SQL> insert into emp_1(empno, ename, job, mgr, hiredate, sal, comm, deptno)
      2  select null, ename, job, mgr, hiredate, sal, comm, deptno
      3    from emp_1
      4   where rownum <= 10
      5  /
    10 rows created.
    SQL> select * from emp_1
      2  /
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
               SMITH      CLERK           7902 17-DEC-80        800                    20
               ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
               WARD       SALESMAN        7698 22-FEB-81       1250        500         30
               JONES      MANAGER         7839 02-APR-81       2975                    20
               MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
               BLAKE      MANAGER         7839 01-MAY-81       2850                    30
               CLARK      MANAGER         7839 09-JUN-81       2450                    10
               SCOTT      ANALYST         7566 19-APR-87       3000                    20
               KING       PRESIDENT            17-NOV-81       5000                    10
               TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
    24 rows selected.
    SQL> select max(empno) from emp_1
      2  /
    MAX(EMPNO)
          7934
    SQL> create sequence emp_seq start with 7935
      2  /
    Sequence created.
    SQL> update emp_1 set empno = emp_seq.nextval where empno is null
      2  /
    10 rows updated.
    SQL> select * from emp_1
      2  /
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
          7935 SMITH      CLERK           7902 17-DEC-80        800                    20
          7936 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7937 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7938 JONES      MANAGER         7839 02-APR-81       2975                    20
          7939 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7940 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7941 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7942 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7943 KING       PRESIDENT            17-NOV-81       5000                    10
          7944 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
    24 rows selected.

  • How to trace the database table for a structure

    hi
    am trying to find the database table for a structure unfortunately am failing to use the sql tracer any one know howelse i can do that the structure name is 'busbankcheck' and 'bus000flds'.
    thanx in advance

    Hi florence,
      1)      U can go to tcode sldb and give ur structure name or if u can find which logical database it is from u can get the tables of the structure....
    Suppose it is of HR it may be like pnp logical database and then to sldb and give pnp and u can get all the table of that....
    2)If u know which fields u want from the stucture....then go to table DD03L and give ur fields name and it iwll bring where all tables this field is avaialble and u can find them......
    3) the st05 sql trace can help u.....
    I hope any one of the three will definetely help uuu
    Regards
    vamsi
    Edited by: vamsi talluri on Jan 22, 2009 1:24 PM

  • DropDownList connected to the database table

    Hello Gurus.
    How it is possible to create a value help for a field in web dynpro application and connect it to the database table column.
    In ABAP it seems simple to me, but what about web dynpro application written in Java?
    I use the Sap Netweaver Developer Studio.
    Thank yoo .
    LUCAS

    Hi
    I have mention the rs as ResultSet from database.
    See the thread for database connection
    Re: what is the process to connect to database from webdynpro ?
    try{
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    Connection conn= java.sql.DriverManager.getConnection("jdbc:microsoft:sqlserver://Server:Host;user=UserName;password=Password;database=DBUser");
    Statement st=conn.createStatement();
    ResultSet rs=st.executeQuery("SQLSelect");
    //Do the rest of code
    }catch(Exception e){
    You can get the samples and Tutorials from here.
    You can understand how it works try to import the samples and learn how to get the values and assign the values to a UI elements.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d">web Dynpro Sample Applications and Tutorials</a>
    Kind Regards
    Mukesh

  • How to find communication channels in the database

    Hello,
    how can I find communication channels in the database? Exists here a webservice or a template to read them out automatically? Has anyone here an idea or experience with it?
    Thanks in advance,
    kind regards,
    Peter Mueller

    Hi stephan,
       In XI all the intrgration logic will be stored as Design time objects(Integration Objects) and Runtime objects (Integratin Directory).So there wont be any specific tables that store all of them .But XI holds them in CACHEs called CPA caches and there are different caches too.
    Tables in XI
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/xi+tables
    For caches:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1a69ea11-0d01-0010-fa80-b47a79301290
    Important Tcodes
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/xiTransactionCodes
    Thanks,
    Ram.

  • Nsert/Update and Add Column at the same Table and at the "same" Time

    Hello,
    I want Insert/Update and Add Column at the same Table and at the "same" Time but in different sessions.
    Example:
    At first the "insert/update" statement:
    Insert into TestTable (Testid,Value) values (1,5105);
    After that the "add" statement:
    Alter table TestTable add TestColumn number;
    - sadly now I get the message: ORA-00054: resource busy and acquire with NOWAIT specified
    "insert/update" statement:
    Insert into TestTable (Testid,Value) values (2,1135);
    After that the execute commit.
    I don't know when the first session set the commit statement so I want that the DB the "Alter Table..." statement execute if it's possible.
    If it's possible I want to save a repeat loop with the "Alter Table..." statemtent.
    Thanks for ideas

    Well I want to walk in the rain without and umbrella and still stay dry, but it ain't gonna happen.
    You can't run a DDL statement against a table with transactions pending. Session 2 has to wait until session commits or rollbacks (or until the session is killed). That's just the way it is.
    This makes sense if you think about it. The data dictionary has to be consistent across all sessions. If session 2 was allowed to change the table structure whilst session 1 has a pending transaction then the database is in an inconsistent state. This is easier to see if you consider the reverse situation - the ALTER TABLE statement run by session 2 does a DROP COLUMN TESTID rather than adding a column: now what should happen to session 1's INSERT statement? You have retrospectively invalidated a statement that was perfectly legal when it was executed.
    If it's possible I want to save a repeat loop with the "Alter Table..." statemtent.Fnord.
    Cheers, APC

  • Knowing the primary key columns of the given table

    Hi,
    How can I get the primary key columns of the given table?
    Regards,
    Sachin R.K.

    You can find the constraint_name from all_constraints/user_constraints for constraint_type = 'P' (which is the primary key constraint).
    And then see which columns are in for the constriant_name
    in all_cons_columns/user_cons_columns view.
    Below is the example
    select acc.column_name from
    all_cons_columns acc, all_constraints ac
    where acc.constraint_name = ac.constraint_name
    and acc.table_name = 'DEPT' AND acc.owner = 'SCOTT'
    and ac.constraint_type = 'P'
    Hope this helps
    Srinivasa Medam

  • FM or BAPI to update the database table /TDAG/CPT_DEC_IN

    Hi All,
      I need to update a few entries in the database table /TDAG/CPT_DEC_IN (CP: Declarable Substances, Independent attributes). This table contains data for the EHS ( Environment, Health and Safety) Module in SAP.
      Instead of doing a direct database update, I needed a FM or a BAPI to update the same.
    Any pointers towards this will be really useful.
    Thanks and Regards,
    Arti Dohare

    Hi Raymond,
    Thanks for the reply. it seems I was using the wrong BAPI then.
    I actually created the network using the BAPI "BAPI_BUS2002_CREATE".
    This BAPI does not have the field call "Resp. cost cntr" in its input parameters and so I could not pass it there. Now I am trying to find if there is any standard FM or BAPI to maintain this field in the networks.
    I request you to please suggest some FM or BAPI if you know.
    Thanks and Regards.
    Piyush R Sakharkar.

Maybe you are looking for

  • Unable to download Raw files from Canon 5D Mark III. [was:Blue flower]

    When I download my raw images from  my canon eos 5d mark 3 I get a blue flower and no image. How do I fix this.

  • Java update 51 for mac os x

    I've tried to login to the XMF for my company to send artwork to a printer on both Chrome Version 34.0.1847.116, Safari Version 7.0.3 (9537.75.14) and Firefox 27.0. I think I have the most recent version of Java installed but I can't find out which v

  • Powermac G5 Suddenly shuts down during use

    My mac started doing this a few days ago, and it's starting to worry me. While using my mac, the screen goes black and the computer automatically restarts? It even did what sounded like a PRAM reset once and chimed 3 times? I'm taking a wild guess, a

  • Grub & error trying to boot other linux partition

    My 40 gig hard drive is partitioned like this hda1 = Arch Linux partition (XFS file system, Grub installed to MBR) hda5 = swap partition for Arch hda6 = Vector Linux partiton (Reiser file system, LILO installed to superblock) hda7 = swap partition fo

  • Need Help in Photoshop

    Hello I have an Assignment due on Dec 10, and need to know how to Take a picture of a web site and put it into my Adobe Photoshop.  I can't copy and past the whole web site... how is this done? Thanks for the help.