1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Problem with multiple "not in " conditions in query

Discussion in 'SQL PL/SQL' started by nazeer4u, Nov 12, 2009.

  1. nazeer4u

    nazeer4u Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    55
    I am getting the following error when trying to execute a query with multiple 'not in' conditions. There are about 900 values in each condition (Total 3 conditions). I am quite sure that there is not problem with syntax as it is working when few of the values in the 'not in' condition are removed.

    ORA-00600: internal error code, arguments: KGHAL02,0x0],[,],[,],[,[]

    The query goes like this.

    Select specimen_id, specimen_name from specimen,entity_type where specimen.entity_type_code = entity_type.entity_type_code where entity_type.entity_type = 'Sample' and specimen.specimen_id
    not in ('A','B'...............) and specimen.specimen_id not in ('X','Y',............) and specimen.specimen_id not in ('AA','BB');

    There are multiple not in conditions on same column as oracle does not support more than 1000 values in 'in' or 'not in' condition
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO

    The ORA-00600 indicates you must do one of two actions:

    1) consult the lookup tool on Metalink to discover if this is a known issue that has been resolved
    2) open an SR with Oracle Support

    If you need help interpreting the results from option 1 let us know.
     
  3. nazeer4u

    nazeer4u Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    55
    Do we need any CSI number to look at the info. from the metalink site as i have the oniy trial version here.
     
  4. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    You need to have a Metalink Account username/password. If you are working for a company, they will provide you one.