Find column name in a package

Hi,
I am working in oracle 9i . I want to know the specified column (one) in the procedures that are availbale in the schema.
For ex.
If my schema contains 10 procdure means, i want to know the column (one) that are used in how many procedures..
rgds...

Like this?
select * from user_source where upper(text) like '%YOUR_COLUMN%'

Similar Messages

  • Finding column name in database

    Hi all..
    I want to find each column name, how many tables this column name is there
    in database.
    For single colum, i can find by using this query..
    select a.COLUMN_NAME, a.TABLE_NAME from all_tab_columns a where
    a.OWNER='DC_ERD' and a.COLUMN_NAME ='ACCESSORY_MAKER'
    If i want to find for each column present in the database, can anybody please tell
    me if it is possible in sql or pqsql is needed.
    Thanks in advance,
    Pal

    Are you asking about the number of tables, it's been used or the tables list?
    select column_name, count(table_name)
    from all_tab_columns
    group by column_nameCheers
    Sarma.

  • Finding Column Name for a Data Pattern

    Hi all,
    I want to find out all the column names which is having matching data pattern such as 'Football'
    I want to get all those column names whose data matches value 'FootBall'
    Which Data Dictionary i can find out column name with data value
    Pls advice
    Thanks

    Definitely a strange requirement but hey....
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    cursor cur_tables is
      3      select table_name from user_tables order by 1;
      4    cursor cur_columns(p_table IN VARCHAR2) is
      5      select column_name from user_tab_columns
      6      where data_type IN ('CHAR', 'VARCHAR2')
      7      and table_name = p_table;
      8    v_cnt NUMBER;
      9    v_sep VARCHAR2(10);
    10    v_where VARCHAR2(2000);
    11    v_word VARCHAR2(30) := 'FOOTBALL';
    12  begin
    13    DBMS_OUTPUT.ENABLE(1000000);
    14    FOR t IN cur_tables
    15    LOOP
    16      v_sep := ' WHERE ';
    17      v_where := NULL;
    18      FOR c IN cur_columns(t.table_name)
    19      LOOP
    20        v_where := v_where||v_sep||c.column_name||' LIKE ''%'||v_word||'%''';
    21        v_sep := ' OR ';
    22      END LOOP;
    23      IF v_where IS NOT NULL THEN
    24        EXECUTE IMMEDIATE 'SELECT count(*) FROM '||t.table_name||v_where INTO v_cnt;
    25        IF v_cnt > 0 THEN
    26          DBMS_OUTPUT.PUT_LINE(v_word||' is in table '||t.table_name);
    27        END IF;
    28      END IF;
    29    END LOOP;
    30* end;
    SQL> /
    FOOTBALL is in table ADDRESS
    FOOTBALL is in table LOGTEXT
    FOOTBALL is in table NOMINAL
    PL/SQL procedure successfully completed.
    SQL>

  • Enhancement Request: Sorting column-names AND Saving Package in clipboard

    Hi,
    I would like to have the following features:
    - Sorting with the column-names (A-Z) would be very nice like I can do in the worksheet or the columns-tab but not in the data-tab
    - Saving source code of packages not only to file but to clipboard.
    Thanks, Juergen

    Hi Juergen,
    Sorting with the column-names (A-Z) would be very nice like I can do in the worksheet or the columns-tab but not in the data-tabThat's already requested on the SQL Developer Exchange. Go vote on it there to add more weight.
    Saving source code of packages not only to file but to clipboardYou can add that one as a new request, but I'd say chances are small to see this implemented.
    What I do is ctrl-a (select all), then ctrl-c (copy to clipboard). If you don't like using the keyboard, you can do it through the Edit menu. Isn't that enough to satisfy everyone's needs?
    Regards,
    K.

  • How to find column names in a table

    Am learning the basics of SQL Plus.
    Have entered the following query:
    SELECT * FROM t_ebb_session;
    This gives me the following output.
    USER_ID SESSION_ID LAST_ACCE
    However LAST_ACCE is not the full name of the column as I get 'Invalid column name when I use it in a select statement.
    How do I display the full name?

    By default, SQL*Plus will set the column display width of a character column to its size in the database, and the heading will be the column name in uppercase, truncated to fit that width if necessary. (There is a different rule for numeric columns.)
    You can override this with the COLUMN command, e.g:
    COLUMN some_column_name FORMAT a30 HEADING "Alternative Name"
    Check out the SQL*Plus documentation for all the COLUMN options.

  • Find column name from constraint name

    How to fetch the column name from a constraint name to which the constraint is applied?.
    I only know the name of the constraint and can get the table name from "dba_constraints". How can I know to which column in the table this constraint is applied.
    Thanks

    What about this?
    satyaki>
    satyaki>
    satyaki>desc user_cons_columns;
    Name                                      Null?    Type
    OWNER                                     NOT NULL VARCHAR2(30)
    CONSTRAINT_NAME                           NOT NULL VARCHAR2(30)
    TABLE_NAME                                NOT NULL VARCHAR2(30)
    COLUMN_NAME                                        VARCHAR2(4000)
    POSITION                                           NUMBER
    satyaki>
    satyaki>Regards.
    Satyaki De.

  • Finding columns names in a ResultSet

    Hi,
    Is it possible to get the columns names in a ResultSet ?
    After a SQL query, while parsing the ResultSet List, I would like to detect the columns names used in the select processed. Is it possible ?

    Hi,
    Take a look at the method:
    public ResultSetMetaData getMetaData() in the ResultSet.
    /Kaj

  • Finding column Name in structure

    Hi All
    I have a requirement where i have the field names ( matnr, ekorg) etc., in an intenal table. eg., . using those names I need to read another internal table which carries values for the fields. I need to write a program to check if a particular field in table 1 has an initial value in table 2 or not.
    for my logic, I am looping on tab1( since it will contan only few fields) and assigning it to field symbols. but since the values from tab1 are dynamic, i cant hard code to assign field name like Matnr. So I am unable to figure out who to read tab2 with the field names i find in tab1.
    I used cl_abap_tabledescr=>describe_by_data (itab2) to columize the fields of itab2. but this method doesnt fetch me the field values? I was wondering if my approach was correct and if there is any way to use fields from itab1 to read values from itab2.
    I am not an ABAP expert, so any help is appreciated
    Regards
    Ruel

    Hi,
    You can use this to get the field values.
    ASSIGN COMPONENT <comp> OF STRUCTURE <s> TO <FS>.
    [Here|http://help.sap.com/saphelp_470/helpdata/en/fc/eb3923358411d1829f0000e829fbfe/content.htm] is the link to documentation.

  • How to find column name for OIM attributes?

    What is the COLUMN_NAME for attributes "Password Generated" and "Design Console access" in OIM 11g?
    Also I cannot find FormMetaData.xml anywhere. Which file represents FormMetaData.xml in OIM11g?

    Thanks Rajiv.
    Here is what I got for the query,
    SELECT USR_EMP_TYPE FROM USR WHERE USR_FIRST_NAME = 'Test';
    USR_EMP_TYPE
    Consultant
    But Design Console Access is a CheckBox in UserForm for OIM 11g, doesnt this value has to be True/False?
    Please help me understand

  • ORA-00957: duplicate column name

    When I am enableversioning of a table, I get following error messages:
    SQL> execute dbms_wm.enableversioning('transcript');
    BEGIN dbms_wm.enableversioning('transcript'); END;
    ERROR at line 1:
    ORA-00957: duplicate column name
    ORA-06512: at "SYS.LTDDL", line 399
    ORA-06512: at "SYS.LTDDL", line 1117
    ORA-06512: at "SYS.LT", line 7181
    ORA-06512: at line 1
    I checked the column name that will be add by dbms_wm package and did not see any column which would cause this problem.
    Could some one give me the list of reserved column names for dbms_wm package?
    Thanks
    Ashley

    Ashley
    These are some the reserved words used by OWM in its internal views. These can also conflict on enable versioning
    statements.
    RIDCHILD RIDBASE RIDPARENT CHILDSTATE PARENTSTATE BASEDS CHILDDS PARENTDS
    FIRSTCHILDVER CHILDVER PARENTVER POS RID VERSION NEXTVER DELSTATUS
    LTLOCK
    In the release after 9iR2, we have augmented reserved words with a prefix that will commonly not conflict with
    user schema column names.
    Let me know if you were able to identify the reserve word conflict.
    Arun
    [email protected]

  • Finding source database table/column name for a column in a view

    Hi i need to be able to identify the original database table/column name for a column in a view.
    e.g. say i have a view like this
    create v1 as select a.name fname, b.name bname, c.name cname,......
    from u1.names a, u2.names b. u3.names c
    where .....
    Now I want to find out that the database table/column name for the fname, bname and cname columns in the view v1, which in this instance is u1.name.name, u2.names.name, u3.names.name.
    But i need to be able to do it for any view. Short of parsing the SQL is there an easy way of doing this?
    Now obviusly I can't do this for virtual columns but I will know my column is not virtual as it has an index on it.

    But i need to be able to do it for any view. Short of
    parsing the SQL is there an easy way of doing this?No, parsing the SQL is the only way. Good luck it is not something I would want to attempt.

  • How to find the column name and table name with a value

    Hi All
    How to find the column name and table name with "Value".
    For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
    Any help is highly appricatable
    Thanks & Regards
    Srikkanth.M

    2 solutions by Michaels (the latter is 11g upwards only)...
    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"or
    SQL> 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 ('EMP', 'DEPT')
    TABLE_NAME           COLUMN_NAME          SEARCH_STRING        RESULT   
    DEPT                 DNAME                ES                   RESEARCH 
    DEPT                 DNAME                ES                   SALES    
    EMP                  ENAME                ES                   JONES    
    EMP                  ENAME                ES                   JAMES    
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   PRESIDENT
    EMP                  JOB                  ES                   SALESMAN 
    9 rows selected.

  • Finding column and table name

    Hi,
    I need to find out that '101c_0000000018' value is which column and table of database.
    Is there a way to find it? I am looking for table and column which is storing this data.
    Thanks
    Sandy

    It's possible but performance is going to be horrible.
    Assuming the data is stored in a CHAR or VARCHAR2 column, something like
    DECLARE
      l_value VARCHAR2(100) := '101c_0000000018' ;
      l_cnt   PLS_INTEGER;
      l_sql    VARCHAR2(1000);
    BEGIN
      FOR x IN (
          SELECT table_name, column_name
            FROM dba_tab_cols
           WHERE owner = <<name of schema>>
             AND data_type IN ('CHAR', 'VARCHAR2' )
      LOOP
        l_sql := 'SELECT COUNT(*) FROM ' || x.owner || '.' || x.table_name || ' WHERE ' || x.column_name || ' = :1';
        EXECUTE IMMEDIATE l_sql
          INTO l_cnt
         USING l_value;
        IF( l_cnt > 0 )
        THEN
          dbms_output.put_line( 'Found the value ' || l_value || ' in owner = ' || x.owner || ' table name = ' || x.table_name || ' column name = ' || x.column_name );
        END IF;
      END LOOP;
    END;Justin
    Edited by: Justin Cave on Dec 8, 2011 12:20 PM

  • Find the column name for a constraint

    Hi Guru,
    I know the constraint name, now i need the column name and table name for the constraint?
    Thanks

    Query the USER_CONS_COLUMNS  then you will find the column name and table Name
    SQL> Select  *  from  USER_CONS_COLUMNS  where Constraint_Name='<Your_constraint_Name>';

  • Find all tables in db with column name of a particular string?

    I'm looking for all tables in a db that have a certain column name. How can I find this?

    John,
    thanks for your answer.
    John Mcginnis wrote:
    The quick search field in the schema browser is doing client-side filtering of the list of objects. This means we can only filter on things that we already have fetched from the database, like the object name. We have no current plans to extend the types of information that can filter on, although it is possible we might add the ability to filter based on a few other types of information that we generally fetch with the object name. However, filtering by column name would require pre-fetching the lists of columns for all tables and as such is not likely to be added to the schema browsers search field.
    I'm sure you guys had a Toad review to understand how things are done there.....so
    My 2 cents are: instead of pre-fetching the columns of all tables why don't you add a button below the table drop-down list which should fetch the tables based on the filter columns condition - exactly like Toad.
    Thanks,
    Dani

Maybe you are looking for