Find EMP tables without SAL column

We have EMP tables in several of our schemas. Some of these EMP tables have SAL column missing.
How can i find the schemas whose EMP tables have a missing SAL column from DBA_TAB_COLS view?

Hi,
Here's another way, that only requires one pass throught the view:
SELECT       owner
FROM       dba_tab_cols
WHERE       table_name     = 'EMP'
GROUP BY  owner
HAVING       COUNT (CASE WHEN column_name = 'SAL' THEN 1 END)     = 0
ORDER BY  owner
;This might be more efficient, but, unless you have thousands of tables called EMP, you won't notice it. You might keep this tecnique in mind for similar problems where efficency is imporatant.

Similar Messages

  • Table without Key column

    Hi guys,
    I am almost stuck with one report requirement which is to remove duplicate records. Duplicate records come from a table which does not have any Primary key/Foreign key/Unique constraint and that's why so many repeating records.
    Now one of these columns is used in a join to extract other information from different tables. But when i try to fetch using DISTINCT query goes in infinite loop and does not respond.
    Can anybody suggest me a solution to this problem at BO level? Do I tell Business analyst that the source of problem lies in the table without any key.?
    Thanks,
    Manish Amin

    Hi,
    this link usefull for you:
    [http://businessobjectsguru.blogspot.com/2008/02/find-and-remove-duplicate-rows-from.html]
    All the best,
    Praveen

  • Loading source tables without common columns using owb

    Dear All,
    I have 5 tables say a,b,c,d,e who has no columns between any of these tables .but i need to poulate some of the columns in each table as per my requirement and
    i need to load into my target table which needs the above tables source columns data .
    how can we achieve this as we dont have any columns across 5 tables.
    regards
    rajesh

    Same thread .
    Loading source tables data without common columns in  owb
    Please close it.
    Edited by: Nawneet on May 18, 2009 11:06 AM

  • Insert data into a table without identity column

    Hi,
    I need to insert data into a table using data flow task. Unfortunately this table's priamry key column (integer column) is not identity column.  I am looking a way to get the primary key value for the new records. Please advice. Thanks

    Phil has a great post on generating surrogate keys in SSIS: http://www.ssistalk.com/2007/02/20/generating-surrogate-keys/

  • Adding fields to an existing table without dropping it

    Hi Guys,
    Just wondering if anyone can tell me if it's possible to write an SQL statement to add extra fields to an existing table without dropping it then re-creating and also what SQL would be needed. The added fields will be part of an exclusive arc, so can contain NULL values.
    Any help would be much appreciated.
    Anton

    Hi,
    You can Use the ALTER TABLE statment.
    like consider emp table having 3 columns empno,enmae,deptno.
    now u want to add sal and mgr columns.
    u can do it like this
    ALTER TABLE ADD ((sal NUMBER(5,2),(mgr NUMBER));
    If u want to modify the column datatype
    u can use ALTER TABLE MODIFY (<column datatype>............);
    Trinath Somanchi,
    Hyderabad.

  • Minimum hiredate in emp table

    Hi,
    There is an emp table, which a column hiredate(date). I want to get the record with minimum hiredate and using this query.
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> with t as
      2  (select 'A' ename, 1 enum, '1-Oct-2008' hiredate from dual union all
      3  select 'B', 2, '1-Jan-2002' from dual union all
      4  select 'C', 3, '1-Mar-2008' from dual)
      5  select * from t
      6  where hiredate = (select min(hiredate) from t);
    E       ENUM HIREDATE
    B          2 1-Jan-2002
    SQL> Is there any other way to do it, without using subquery?
    Regards,
    Ritesh

    Centinul:
    Are you sure?
    I added another record with the "lowest" hiredate. The OP's original version:
    SQL> with t as
      2     (select 'A' ename, 1 enum, '1-Oct-2008' hiredate from dual union all
      3      select 'B', 2, '1-Jan-2002' from dual union all
      4      select 'C', 3, '1-Mar-2008' from dual union all
      5      select 'D', 4, '1-Jan-2002' from dual)
      6  select * from t
      7  where hiredate = (select min(hiredate) from t);
    E       ENUM HIREDATE
    B          2 1-Jan-2002
    D          4 1-Jan-2002Your version:
    SQL> with t as
      2     (select 'A' ename, 1 enum, '1-Oct-2008' hiredate from dual union all
      3      select 'B', 2, '1-Jan-2002' from dual union all
      4      select 'C', 3, '1-Mar-2008' from dual union all
      5      select 'D', 4, '1-Jan-2002' from dual)
      6  SELECT  MIN(ENUM)       KEEP (DENSE_RANK FIRST ORDER BY HIREDATE)       AS ENUM,
      7          MIN(HIREDATE)   KEEP (DENSE_RANK FIRST ORDER BY HIREDATE)       AS HIREDATE
      8  FROM    t;
          ENUM HIREDATE
             2 1-Jan-2002Your version also misses the ename column which the OP has, so yours needs to be more like:
    SQL> with t as
      2     (select 'A' ename, 1 enum, '1-Oct-2008' hiredate from dual union all
      3      select 'B', 2, '1-Jan-2002' from dual union all
      4      select 'C', 3, '1-Mar-2008' from dual union all
      5      select 'D', 4, '1-Jan-2002' from dual)
      6  SELECT  ename, MIN(ENUM) KEEP (DENSE_RANK FIRST ORDER BY HIREDATE) AS ENUM,
      7          MIN(HIREDATE) KEEP (DENSE_RANK FIRST ORDER BY HIREDATE) AS HIREDATE
      8  FROM    t
      9  GROUP BY ename;
    E       ENUM HIREDATE
    A          1 1-Oct-2008
    B          2 1-Jan-2002
    C          3 1-Mar-2008
    D          4 1-Jan-2002Which kind of defeats the purpose :-)
    Top replicate the behaviour of the OP's query:
    SQL> with t as
      2     (select 'A' ename, 1 enum, '1-Oct-2008' hiredate from dual union all
      3      select 'B', 2, '1-Jan-2002' from dual union all
      4      select 'C', 3, '1-Mar-2008' from dual union all
      5      select 'D', 4, '1-Jan-2002' from dual)
      6  select *
      7  from (SELECT t.*, DENSE_RANK() OVER(ORDER BY hiredate) rn
      8        FROM t)
      9  where rn = 1
    E       ENUM HIREDATE           RN
    B          2 1-Jan-2002          1
    D          4 1-Jan-2002          1It still has a sub-query, but it is only one pass through the table which I took to be the point.
    John

  • Trying to use ALL_TAB_COLS  to find two tables based on input rows

    I'm using 9i.
    I'm trying to use the ALL_TAB_COLS table to find two tables that contain columns I can join them on. I know the names of the two tables. We can call them table1 and table2. I just using the columns that are stored in them below to find a common set of tables.
    The query I'm using is the following
    select distinct did.TABLE_NAME, did.COLUMN_NAME 
    from     
        (Select * from ALL_TAB_COLS 
        where column_name in('SO_LINE_ID','SO_LINE_NUMBER', 'SO_ORDER_NUMBER', 'SO_HEADER_ID','AR_CUSTOMER_TRX_LINE_ID')
        --and OWNER = 'FTBV'
        ) did 
    join 
        (Select * from ALL_TAB_COLS 
        where column_name in('SCHED_DISTRIBUTION_ID', 'CODE_COMBINATION_ID', 'PRODUCT_BUSINESS_CODE', 'PRODUCT_GROUP_CODE', 'PRODUCT_CODE')
        --and OWNER = 'FTBV'
        ) iii
    on did.TABLE_NAME = iii.TABLE_NAME;It's giving me limited results.
    What I need is something that can find interim tables that would link my two tables together based on the unique columns I've provided. Does such a query exist?
    Thanks in Advance.

    Only if there is a defined foreign key relationship. If there is one the queries you want are on the Constraints page of Morgan's Library at www.psoug.org. If they do not exist then you need to find a subject matter expert that can explain the application's design.
    The fact that you are asking this question is a strong indication of a lack of proper documentation at your facility: Something you might wish to address.

  • Need demo of a simple chart item using emp table sal column

    DB version:10g
    Forms version 10g
    Hi folks,
    Can anyone please post some sample code for a simple chart item based on emp table in forms 10g.
    lets say show the salary variations using chart item.
    Please do help.
    thanks in advance.

    There are samples for doing this (not easy to find for 10g these days).
    http://www.oracle.com/technetwork/developer-tools/forms/news-section-086804.html
    Have a look for the BI Graph Patch link for 10g on this page.
    Steve

  • How to find whether the created Sales Order is with BOM or without BOM ?

    Hello,
    I am technical guy i want to find whether the created sales order is with BOM or without bom.
    Can anyone help me with table details.
    Regards
    VEk@

    Go to TVAP & in FIELD STRUM give 'A' & PSGRP as 'SD01'.It will giveyou all the Item categories maintained in BOM.
    Now you can cross - check with the Item Category maintain in the Sales Order.
    Best Regards,
    Ankur

  • Sql query for finding a string in a column of a table

    Hi All,
    I have an issue, I have gotten a string ie '1D USD PRIME' and I have access to oracle's dictionary tables and views such as (all_source, all_tab_cols etc), my requirement is to find which table' column holds my above mentioned string, so I mean both the table name and the column name, it could be that this string might exist in more than 1 table so I want all the tables that holds it.
    Regards
    Rahul

    Hi All,
    I think you misunderstood my question, so may be I didnt ask it properly, so here it is I am explaining in detail with an example.
    Suppose I have 10 users with 10 different user name's in a database and I am the 11th user as DBA, every 10 of these users have created some tables lets say 20 tables each by every user making a count of the total tables as 200, now lets say 10 of 200 tables has a column ie fname with value as 'rahul', I want to search the string 'rahul' from all the 200 tables that which of the tables contains this string along with the column name.
    I hope this time my question is clear, the point is I just know of a value and I dont know the table name and column name where it may actually residing, futher I want to search tables of other users as well.
    Regards
    Rahul

  • In which table,i could find order quantity for sales order..??

    In which table, i could find order quantity for sales order..??
    and also in which table i could find delivery for sales order..
    need help..??
    Moderator message: please search.
    Edited by: Thomas Zloch on Feb 23, 2012

    Check the table AUFM.
    Give the order number in AUFNR.
    For movement type 261 (GI) & 101 (GR), you can get the material document number (MBLNR), Material (MATNR), Qty (MENGE) & UoM (MEINS).

  • Using column value is it possible to find the table name in the database?

    Hi all,
    using column value is it possible to find the table name in the database?
    guys i need the table value
    Note:
    oracle-9i
    for example:
    i don't know NIC(column value) in which table in the database.
    Thank you,
    with regards,
    JP.
    Edited by: Guest on Feb 27, 2012 5:42 AM

    Hi,
    As far as I understand what you are asking for I would suggest 4 data dictionaries that will help you to know the table name from the column names
    1. USER_TAB_COLS
    2. ALL_TAB_COLS
    3. DBA_TAB_COLS
    4. COLS
    These can give you detail information about the columns and respective tables at user, schema, dba level. Further information on the table can be found by querying ALL_OBJECTS table giving table_name as Object_name, or you can join the data dictionaries too.
    To know about various data dictionaries avalible in Oracle please query select * from cat;
    Let us know if you need further assistance.
    Twinkle

  • Table name to find customer and which sales area he belongs to?

    Table name to find customer and which sales area he belongs to?

    Hi suchita,
    You can find these information Sales area he belongs and all in the table of  KNVV , take the customer number from customer master  KNA1-KUNNR  put it in KNVV-KUNNR. you can find all the  sales details.
    if you need more info send breaf requirement.
    if helpful award the points
    Regards
    Ram

  • Finding a TABLE based on a COLUMN NAME...

    I need to find all tables that that have a common column name.
    Upon searching the Forum, I found this nice nugget:
    How to find the table in a schema if I only know a particular column name
    The problem is, my USER_TAB_COLUMNS is EMPTY!
    If it had worked, then my statement would be:
    select * from USER_TAB_COLUMNS
    where COLUMN_NAME LIKE '%TEST%'
    and OWNER='ME';
    I get "no rows selected" (though I know they exist)
    if I do:
    select * from USER_TAB_COLUMNS
    I also get "no rows selected"
    Any ideas!
    Thanks!
    KSL.

    The user_xxx data dictionary tables show all of the whatevers that are owned by the logged in user. So, if you are logged in as user1 the user_tab_columns view will only show tables and views owned by user1.
    The all_xxx dictionary views show all of the whatevers that the logged in user has access to. so if you are logged in as user1 and user2 gave you selet privileges on tablea, then you would see tablea in all_tab_columns.
    The dba_xxx views show all objects in the database, but are generally only available to privileged users.
    If you have access to the dba_views, try:
    SELECT owner, object_type
    FROM dba_objects
    WHERE UPPER(object_name) = 'ANL'It is possible that the table and or its columns were created with double quotes so are case sensitve. It may also be a synonym, pointing to one of the tables that you got form your query.
    If you are only using all_tab_columns then it is possible that the user you are logged in as does not have privileges on the table anl so would not see it in the view.
    A long shot, but are you sure you are in the right database?
    John

  • Pivot table without any measure columns

    Hi,
    I have a requirement where all my report columns are from Dimension tables and i have no measure to display in the report.
    But I need to create a Pivot table view for this requirement.
    Can someone help me how to represent results in Pivot Table view without measure columns
    Thanks in Advance.

    Hi Sri,
    Try this it will work.
    Add a dummy column in your measure section.
    then in pivot view --> measure section --> dummy column -->more options -> format heading -->custom css style --> mark use custom css and give display:none
    and
    more options -> format measure values -->custom css style --> mark use custom css and give display:none
    Thanks
    Diney

Maybe you are looking for

  • WOW! Major video issues here..and everywhere it seems!!

    I have the latest iTunes version and runnin Windows Vista. Multiple issues with new 64gb ipod touch..well with itunes: I can drag and drop new vids, songs pix etc to my touch, but when I go to convert to ipod verison on the vid the screen wither lock

  • Problem loading Applets from Jar files on 64 bit machine

    I am developing an applet (extends Applet but uses swing components) using JDK 1.6 (Though these problems still happen in JDK 1.7) and I am unable to get the applet to load on a 64 bit machine in most cases. The web server(s) are running on localhost

  • Billing document without history not posted

    Hi all, i have folowing problem: 1. Billing document is posted in previous period (period is closed) 2. Users have canceled billing document in current period but with wrong date and canceled billing document is in VFX3 3. Users have canceled goods i

  • Thunderbird hangs when moving messages to sent and other folders

    Now and then (sometimes once a week - sometimes multiple times per day) Thunderbird looses the ability to move messages to folders. Typical symptoms are: Send a message - message sends fine - then it hangs forever with the dialog box saying that it i

  • Looking for someone on x86_64 to test a snippet of C#

    I'm having trouble getting a piece of C# code to work. It's 100% correct and was found working by two users running x86, however on my x86_64 it doesn't. It should display an icon in the notification area ('system tray'). For me it won't show the ico