Where clause with null values

I need to have a where clause but either/both of the two attributes compared could be null. How can I make this work, atm it just returns no records even though rows do exist.
Thanks

Andrew,
I think you didn't read correctly what I wrote. I said:
"Even if a column is unique you still can have several nulls in it"
So I didnt speak about the case where you have severeal columns in a unique constraint but only ONE.
SQL> CREATE TABLE tab1 (col1 number);
Table created.
SQL> ALTER table tab1 add constraint tab1_col1_uk unique (col1);
Table altered.
SQL> INSERT INTO tab1 VALUES (1);
1 row created.
SQL> INSERT INTO tab1 VALUES (2);
1 row created.
SQL> INSERT INTO tab1 VALUES (2);
INSERT INTO tab1
ERROR at line 1:
ORA-00001: unique constraint (MUELLERMAU.TAB1_COL1_UK) violated
SQL> INSERT INTO tab1 VALUES (NULL);
1 row created.
SQL> INSERT INTO tab1 VALUES (NULL);
1 row created.
And even if you have a unique constraint over several columns you can still have more than on records containing only nulls in all fields related to that unique contraint.
SQL> CREATE TABLE nn (col1 number, col2 varchar2(3));
Table created.
SQL> ALTER TABLE nn ADD CONSTRAINT nn_uk UNIQUE (col1, col2);
Table altered.
SQL> INSERT INTO nn VALUES (NULL,NULL);
1 row created.
SQL> INSERT INTO nn VALUES (NULL,NULL);
1 row created.
Regards
Maurice

Similar Messages

  • Using where clause with hardcode value in execute immediate

    Dear Experts, I am using below in stored procedure getting exception,
    EXECUTE IMMEDIATE 'DELETE FROM CC.TB WHERE COL='HG'';
    where col is varchar2(30) in CC.TB
    Please guide how can i use above statement in stored procedure
    Thanks,

    DBA wrote:
    Dear Experts, I am using below in stored procedure getting exception,
    EXECUTE IMMEDIATE 'DELETE FROM CC.TB WHERE COL='HG'';
    where col is varchar2(30) in CC.TB
    Please guide how can i use above statement in stored procedure
    Thanks,Why are you using Dynamic SQL? DELETE statement is a DML statement and its valid inside a PL/SQL block.
    So you can remove the execute immediate and write your DELETE statement directly.
    begin
      delete from cc.tb where col = 'HG';
    end;

  • SQL query in SQL_REDO Logminor showing where clause with ROWID

    SQL query in SQL_REDO Logminor showing where clause with ROWID. I dont wanted to use rowid but wanted to use actual value.
    OPERATION SQL_REDO SQL_UNDO
    DELETE delete from "OE"."ORDERS" insert into "OE"."ORDERS"
    where "ORDER_ID" = '2413' ("ORDER_ID","ORDER_MODE",
    and "ORDER_MODE" = 'direct' "CUSTOMER_ID","ORDER_STATUS",
    and "CUSTOMER_ID" = '101' "ORDER_TOTAL","SALES_REP_ID",
    and "ORDER_STATUS" = '5' "PROMOTION_ID")
    and "ORDER_TOTAL" = '48552' values ('2413','direct','101',
    and "SALES_REP_ID" = '161' '5','48552','161',NULL);
    and "PROMOTION_ID" IS NULL
    and ROWID = 'AAAHTCAABAAAZAPAAN';
    DELETE delete from "OE"."ORDERS" insert into "OE"."ORDERS"
    where "ORDER_ID" = '2430' ("ORDER_ID","ORDER_MODE",
    and "ORDER_MODE" = 'direct' "CUSTOMER_ID","ORDER_STATUS",
    and "CUSTOMER_ID" = '101' "ORDER_TOTAL","SALES_REP_ID",
    and "ORDER_STATUS" = '8' "PROMOTION_ID")
    and "ORDER_TOTAL" = '29669.9' values('2430','direct','101',
    and "SALES_REP_ID" = '159' '8','29669.9','159',NULL);
    and "PROMOTION_ID" IS NULL
    and ROWID = 'AAAHTCAABAAAZAPAAe';
    Please let me know solution/document which will convert SQL redo rowid value with actual value.
    Thanks,

    Please enclose your output within tag so that people here can read it easily and help you. Also the reason that why you want to remove rowid?
    Salman
    Edited by: Salman Qureshi on Mar 20, 2013 3:53 PM                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Generate a where clause with outer join criteria condition: (+)=

    Hi,
    In my search page, I use Auto Customization Criteria mode, and I build where clause by using get Criteria():
    public void initSrpQuery(Dictionary[] dic, String userName) {
    int dicSize = dic.length;
    StringBuffer whereClause = new StringBuffer(100);
    Vector parameters = new Vector(5);
    int clauseCount = 0;
    int bindCount = 1;
    for(int i=0; i < dicSize; i++){
    String itemName = (String)(dic.get(OAViewObject.CRITERIA_ITEM_NAME));
    Object value = dic[i].get(OAViewObject.CRITERIA_VALUE);
    String joinCondition = (String)dic[i].get(OAViewObject.CRITERIA_JOIN_CONDITION);
    String criteriaCondition = (String)dic[i].get(OAViewObject.CRITERIA_CONDITION);
    String criteriaDataType = (String)dic[i].get(OAViewObject.CRITERIA_DATATYPE);
    String viewAttributename = (String)dic[i].get(OAViewObject.CRITERIA_VIEW_ATTRIBUTE_NAME);
    String columnName = findAttributeDef(viewAttributename).getColumnNameForQuery();
    if((value != null) /*&& (!("".equals((String).trim())))*/){
    if(clauseCount > 0){
    whereClause.append(" AND ");
    whereClause.append(columnName + " " + criteriaCondition + " :");
    whereClause.append(++bindCount);
    parameters.addElement(value);
    clauseCount++;
    If I want to generate following where clause:
    select
    ,emp.name
    ,emp.email
    ,emp.salesrep_number
    ,comp.name
    ,gs.srp_goal_header_id
    ,gs.status_code
    ,gs.start_date
    ,gs.end_date
    from g2c_goal_shr_emp_assignments_v emp
    ,jtf_rs_salesreps rs
    ,xxg2c_srp_goal_headers_all gs
    ,cn_comp_plans_all comp
    where 1 = 1
    and rs.salesrep_id = gs.salesrep_id (+)
    and gs.comp_plan_id = comp.comp_plan_id (+)
    and gs.period_year (+) = :1 -- :1 p_fiscal_year
    How can I generate a where clause with outer join : gs.period_year (+) = :1 ? Will I get '(+)=' from get(OAViewObject.CRITERIA_CONDITION)?
    thanks
    Lei

    If you are using SQL-Plus or Reports you can use lexical parameters like:
    SELECT * FROM emp &condition;
    When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
    SELECT &columns FROM &tables &condition;
    But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
    Best of luck!

  • JDBC MS Access--- cannot extract entry with null value with data type Meta

    I'm trying to extract a data entry with null value by using JDBC. The database is MS Access.
    The question is how to extract null entry with data type memo? The following code works when the label has data type Text, but it throws sqlException when the data type is memo.
    Any advice will be appreciated! thanks!
    Following are the table description and JDBC code:
    test table has the following attributes:
    Field name Data Type
    name Text
    label Memo
    table contents:
    name label
    me null
    you gates
    Code:
    String query = "SELECT name, label FROM test where name like 'me' ";
    ResultSet rs = stmt.executeQuery(query);
    while (rs.next())
    String name = rs.getString("name");
    rs.getString("val");
    String label = rs.getString("label");
    System.out.println("\t"+name+"\t"+label);
    catch (SQLException ex)
    System.out.println(ex.getSQLState());
    System.out.println(ex.getErrorCode());
    System.out.println("in sqlexception");
    output:
    C:\Temp\SEFormExtractor>java DBTest
    yet SELECT name, label FROM test
    null
    0
    in sqlexception

    The question is how to extract null entry with data type memo?Okay, what you need to do is this:
    if (rs.getString("val") == null)
      // do something
    }This way, when it's a null value, you can check it first, and then handle it how you want, rather than getting an exception.

  • How can I pass multiple condition in where clause with the join table?

    Hi:
    I need to collect several inputs at run time, and query the record according to the input.
    How can I pass multiple conditions in where clause with the join table?
    Thanks in advance for any help.
    Regards,
    TD

    If you are using SQL-Plus or Reports you can use lexical parameters like:
    SELECT * FROM emp &condition;
    When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
    SELECT &columns FROM &tables &condition;
    But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
    Best of luck!

  • Sql query slowness due to rank and columns with null values:

        
    Sql query slowness due to rank and columns with null values:
    I have the following table in database with around 10 millions records:
    Declaration:
    create table PropertyOwners (
    [Key] int not null primary key,
    PropertyKey int not null,    
    BoughtDate DateTime,    
    OwnerKey int null,    
    GroupKey int null   
    go
    [Key] is primary key and combination of PropertyKey, BoughtDate, OwnerKey and GroupKey is unique.
    With the following index:
    CREATE NONCLUSTERED INDEX [IX_PropertyOwners] ON [dbo].[PropertyOwners]    
    [PropertyKey] ASC,   
    [BoughtDate] DESC,   
    [OwnerKey] DESC,   
    [GroupKey] DESC   
    go
    Description of the case:
    For single BoughtDate one property can belong to multiple owners or single group, for single record there can either be OwnerKey or GroupKey but not both so one of them will be null for each record. I am trying to retrieve the data from the table using
    following query for the OwnerKey. If there are same property rows for owners and group at the same time than the rows having OwnerKey with be preferred, that is why I am using "OwnerKey desc" in Rank function.
    declare @ownerKey int = 40000   
    select PropertyKey, BoughtDate, OwnerKey, GroupKey   
    from (    
    select PropertyKey, BoughtDate, OwnerKey, GroupKey,       
    RANK() over (partition by PropertyKey order by BoughtDate desc, OwnerKey desc, GroupKey desc) as [Rank]   
    from PropertyOwners   
    ) as result   
    where result.[Rank]=1 and result.[OwnerKey]=@ownerKey
    It is taking 2-3 seconds to get the records which is too slow, similar time it is taking as I try to get the records using the GroupKey. But when I tried to get the records for the PropertyKey with the same query, it is executing in 10 milliseconds.
    May be the slowness is due to as OwnerKey/GroupKey in the table  can be null and sql server in unable to index it. I have also tried to use the Indexed view to pre ranked them but I can't use it in my query as Rank function is not supported in indexed
    view.
    Please note this table is updated once a day and using Sql Server 2008 R2. Any help will be greatly appreciated.

    create table #result (PropertyKey int not null, BoughtDate datetime, OwnerKey int null, GroupKey int null, [Rank] int not null)Create index idx ON #result(OwnerKey ,rnk)
    insert into #result(PropertyKey, BoughtDate, OwnerKey, GroupKey, [Rank])
    select PropertyKey, BoughtDate, OwnerKey, GroupKey,
    RANK() over (partition by PropertyKey order by BoughtDate desc, OwnerKey desc, GroupKey desc) as [Rank]
    from PropertyOwners
    go
    declare @ownerKey int = 1
    select PropertyKey, BoughtDate, OwnerKey, GroupKey
    from #result as result
    where result.[Rank]=1
    and result.[OwnerKey]=@ownerKey
    go
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • JDBC Receiver Adapter with Null Value

    HI,
    I have configured ID for JDBC Receiver. In my communication channel, I already check Integration of Empty String Values = Null Value. However, when I check the result from audit log, it still shows that SAP XI sends the null value to database. In my understanding, it should not send the field which has null value (It shouldn't be included in sql statement).
    I check this with other scenario. With the same check at Integration of Empty String Values = Null Value, it doesn't send null value to database. It happens only with my first scenario.
    Have anyone ever been through this before? Any suggestion please?
    Thanks,
    Pavin

    Hi,
    1. The occurrence is 0...1
    2. This is the first result with null value (Please see field Error)
    UPDATE EXPCRM_T_CustomerProfile SET RequestID=455, RecordNo=1, SAPCustomerCode=0001000344, Error=NULL, Status=2, UpdateDateTime=12/03/2008 13:45:03 WHERE (RequestID=455 AND RecordNo=1)
    Then, I change the option from Null Value to Empty string. This is the result.
    UPDATE EXPCRM_T_CustomerProfile SET RequestID=455, RecordNo=1, SAPCustomerCode=0001000344, Error=', Status=2, UpdateDateTime=12/03/2008 13:46:12 WHERE (RequestID=455 AND RecordNo=1)
    Field Error Change from NULL to '
    The expected result from me is that field Error should not exist at all. Please help.
    Thanks,
    Pavin

  • Dynamic where clause with loop statement

    Hi all,
    is it possible to use a dynamic where clause with a loop statement?
    Can you please advise me, how the syntax needs to be?
    Thanks for your suggestions,
    kind regards, Kathrin!

    Hi Kathrin,
               If u are in ECC 6.0, please go through the code...
              REPORT  zdynamic_select.
    TYPES:
      BEGIN OF ty_sales,
        vbeln  TYPE vbak-vbeln,            " Sales document
        posnr  TYPE vbap-posnr,            " Sales document item
        matnr  TYPE vbap-matnr,            " Material number
        arktx  TYPE vbap-arktx,            " Short text for sales order item
        kwmeng TYPE vbap-kwmeng,           " Order quantity
        vkorg TYPE vbak-vkorg,             " Sales organization
        kunnr TYPE vbak-kunnr,             " Sold-to party
        netwr TYPE vbak-netwr,             " Net Value of the Sales Order
      END OF ty_sales.
    DATA :
      gt_sales TYPE STANDARD TABLE OF ty_sales,
      wa_sales TYPE ty_sales.
    DATA: ob_select TYPE REF TO cl_rs_where.
    DATA: ob_from   TYPE REF TO cl_rs_where.
    DATA: ob_where  TYPE REF TO cl_rs_where,
          gv_source TYPE abapsource.
    START-OF-SELECTION.
    *Step 1 : Prepare the select fields.
      PERFORM zf_build_select.
    *Step 2 : Build the from clause for the select
      PERFORM zf_build_from.
    *Step 3 : Build the where clause for the select
      PERFORM zf_build_where.
    *Step 4 : Execute the dynamic select
      SELECT (ob_select->n_t_where)
          FROM (ob_from->n_t_where)
            INTO CORRESPONDING FIELDS OF TABLE gt_sales
            WHERE (ob_where->n_t_where).
      LOOP AT gt_sales INTO wa_sales.
        WRITE :   /5 wa_sales-vbeln,
                  15 wa_sales-vkorg,
                  20 wa_sales-kunnr,
                  40 wa_sales-netwr,
                  50 wa_sales-posnr,
                  60 wa_sales-matnr,
                  70 wa_sales-arktx,
                  90 wa_sales-kwmeng.
      ENDLOOP.
    *&      Form  zf_build_select
    FORM zf_build_select .
      CREATE OBJECT ob_select.
    *Build the table name/field name combination
    *Add Sales order header fields
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAK'
          i_fieldname = 'VBELN'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAK'
          i_fieldname = 'VKORG'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAK'
          i_fieldname = 'KUNNR'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAK'
          i_fieldname = 'NETWR'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
    *Add Sales order item fields
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAP'
          i_fieldname = 'POSNR'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAP'
          i_fieldname = 'MATNR'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAP'
          i_fieldname = 'ARKTX'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
      CALL METHOD cl_rs_where=>build_tabname_fieldname
        EXPORTING
          i_tabname   = 'VBAP'
          i_fieldname = 'KWMENG'
          i_sign      = '~'
        IMPORTING
          e_combined  = gv_source.
    *Add the where line
      CALL METHOD ob_select->add_line
        EXPORTING
          i_line = gv_source.
    ENDFORM.                    " zf_build_select
    *&      Form  zf_build_from
    FORM zf_build_from .
      CREATE OBJECT ob_from.
    *Add opening bracket
      CALL METHOD ob_from->add_opening_bracket
      CLEAR gv_source.
    *Add the join condition.This can be made
    *fully dynamic as per your requirement
      gv_source = 'VBAK AS VBAK INNER JOIN VBAP AS VBAP'.
    *Add the where line
      CALL METHOD ob_from->add_line
        EXPORTING
          i_line = gv_source.
      CLEAR gv_source.
    *Add the join condition.This can be made
    *fully dynamic as per your requirement
      gv_source = 'ON VBAKVBELN = VBAPVBELN'.
    *Add the where line
      CALL METHOD ob_from->add_line
        EXPORTING
          i_line = gv_source.
    *Add the closing bracket
      CALL METHOD ob_from->add_closing_bracket
    ENDFORM.                    " zf_build_from
    *&      Form  zf_build_where
    FORM zf_build_where .
      DATA :
      lv_field TYPE REF TO data,
      lv_field_low TYPE REF TO data,
      lv_field_high TYPE REF TO data.
      CREATE OBJECT ob_where.
    *Add the field VBELN : Sales Document
    *Use this method if you want to assign a single value to a field
    *Set the value for VBELN : Sales Document Number
    CALL METHOD ob_where->add_field
       EXPORTING
         i_fieldnm  = 'VBAK~VBELN'
         i_operator = '='
         i_intlen   = 10
         i_datatp   = 'CHAR'
       IMPORTING
         e_r_field  = lv_field.
    CALL METHOD ob_where->set_value_for_field
       EXPORTING
         i_fieldnm = 'VBAK~VBELN'
         i_value   = '0000120020'.
    *Use this method if you want to assign a range of values
    *Set a range for the Sales Document number
      CALL METHOD ob_where->add_field_between_2values
        EXPORTING
          i_fieldnm      = 'VBAK~VBELN'
          i_intlen       = 10
          i_datatp       = 'CHAR'
        IMPORTING
          e_r_field_low  = lv_field_low
          e_r_field_high = lv_field_high.
      CALL METHOD ob_where->set_2values_for_field
        EXPORTING
          i_fieldnm    = 'VBAK~VBELN'
          i_value_low  = '0000120020'
          i_value_high = '0000120067'.
    *Set the 'AND' Clause
      CALL METHOD ob_where->add_and.
    *Add the field MATNR : Material
      CALL METHOD ob_where->add_field
        EXPORTING
          i_fieldnm  = 'MATNR'
          i_operator = '='
          i_intlen   = 18
          i_datatp   = 'CHAR'
        IMPORTING
          e_r_field  = lv_field.
    *Set the value for the Material field
      CALL METHOD ob_where->set_value_for_field
        EXPORTING
          i_fieldnm = 'MATNR'
          i_value   = '000000000050111000'.
    *Set the 'AND' Clause
      CALL METHOD ob_where->add_and
    *Add the field VKORG
      CALL METHOD ob_where->add_field
        EXPORTING
          i_fieldnm  = 'VKORG'
          i_operator = '='
          i_intlen   = 4
          i_datatp   = 'CHAR'
        IMPORTING
          e_r_field  = lv_field.
    *Set the value for VKORG : Sales Organization
      CALL METHOD ob_where->set_value_for_field
        EXPORTING
          i_fieldnm = 'VKORG'
          i_value   = 'GMUS'.
    ENDFORM.                    " zf_build_where

  • Range interval partitioning with null value

    Hello,
    I have question, how can I create table with partition and after that I will insert null value in the partition key like this kind of
    range interval partitioning with null value.
    I have Oracle 11g.
    Thanks
    Mohammed

    user13777053 wrote:
    Thank you, but my question is about range interval not for range?http://docs.oracle.com/cd/E11882_01/server.112/e25523/partition.htm#VLDBG00220
    A MAXVALUE literal can be defined for the highest partition. MAXVALUE represents a virtual infinite value that sorts higher than any other possible value for the partitioning key, *including the NULL value.*
    So since you're trying to partition by interval (which doesn't support a MAXVALUE clause) you're out of luck.
    There's probably fancy hacks and what not you could try to implement, but i'm not about to recommend any of those here :)
    Cheers,

  • How no to select lines with NULL values

    Hi,
    I am not a newbie newbie in SQL but I do not understand why I cannot retrieve the lines where there are null values.
    The table observatoire.fiche has 2 columns with default values set to NULL : total_heures, and total_heures_exceptionnelles. These are numeric types columns.
    I want not to select lines where :
    total_heures equal NULL AND total_heures_exceptionnelles = NULLI have tried this but I do get an "Invalid relational operator" error message.
    select a.nom || ' ' || a.prenom d, a.agent_id r
    from   OBSERVATOIRE.AGENT a, observatoire.fiche b
    where  a.agent_id = b.agent_id
    and    b.total_heures NOT NULL AND total_heures_exceptionnelles NOT NULL
    group by a.nom, a.prenom, a.agent_id
    order by a.nomCould you help me ?
    Thank you for your kind answers.

    Satyaki_De wrote:
    I think this is not the good way to do it. Did you check my solution? It should work the same output as your solution.Really ?
    test@ORA10G>
    test@ORA10G> -- (1)
    test@ORA10G> with t as (
      2    select 1 as x, 10 as total_heures, null as total_heures_exceptionnelles from dual union all
      3    select 1, null, 20   from dual union all
      4    select 1, null, null from dual union all
      5    select 1, 30, 40     from dual)
      6  --
      7  select x, total_heures, total_heures_exceptionnelles
      8  from   t
      9  where  x = 1
    10  AND NOT ( total_heures IS  NULL
    11            AND
    12            total_heures_exceptionnelles IS NULL
    13          );
             X TOTAL_HEURES TOTAL_HEURES_EXCEPTIONNELLES
             1           10
             1                                        20
             1           30                           40
    test@ORA10G>
    test@ORA10G> -- (2)
    test@ORA10G> with t as (
      2    select 1 as x, 10 as total_heures, null as total_heures_exceptionnelles from dual union all
      3    select 1, null, 20   from dual union all
      4    select 1, null, null from dual union all
      5    select 1, 30, 40     from dual)
      6  --
      7  select x, total_heures, total_heures_exceptionnelles
      8  from   t
      9  where  x = 1
    10  AND    total_heures IS NOT NULL
    11  AND    total_heures_exceptionnelles IS NOT NULL;
             X TOTAL_HEURES TOTAL_HEURES_EXCEPTIONNELLES
             1           30                           40
    test@ORA10G>
    test@ORA10G>isotope

  • Pro*C & SQLDA with NULL value for predicate column

    Hi: I am using a C program to update a table via a dynamic sql (method 4) and SQLDA. In the update statement predicate, I have place holders (as in TBLCOL=:C000). One of the columns in the predicate contains null values, so I set L[n] = 0, V[n] = pData (which pData[0] = '\0'), *(I[n]) = -1, and T[n] = 5 (for text). I cannot find the row that I know is there.
    I cannot change my statement to contain TBLCOL IS NULL, since I don't know ahead of time if I'm looking for rows with null values for this column. The Pro*C manual says that by setting the appropriate *(I[n]) = -1, it indicates to Oracle to simulate the "IS NULL" clause, and update the appropriate rows. In my case, I receive 1403 as SQLCODE when I use TBLCOL=:C000 vs TBLCOL IS NULL. What am I doing wrong? Thank you for your help.

    You should include these columns as well;
    ChangeType (see mxi_changetype)
    ValOwner (repository)
    UserID ("jobid=<>", usermskey, GUI (mmc), DG (dyngrp), reconcile)
    IdAudit  (This is the event task (add and del member for assignments)
    ParentAuditId (AuditID of parent which last updated the attribute, not consistent)
    ChangedBy (Holds the MSKEY of the user which last changed the attribute)
    ExpiryTime
    to make sure you get a fuller picture of the audit record.
    Your selection does not cover all events and descriptions
    br,
    Chris

  • OID: Matching rule where clause is null

    Hi All,
    I've installed OIM 11.1.1.5.0 BP02 with OID connector 9.0.4.14. I am able to provision to OID and to run the "OID User Target Recon" scheduled task successfully. However, when I run the "OID User Trusted Recon" scheduled task, I get the error below. Does anyone know why this error is occurring and how to solve it?
    [2012-05-15T22:55:11.791+02:00] [oim_server1] [NOTIFICATION] [IAM-5010000] [oracle.iam.reconciliation.impl] [tid: OIMQuartzScheduler_Worker-4] [userId: oiminternal] [ecid: 0000JTHLa8WBp20LVyCCyc1FgcIi000002,0] [APP: oim#11.1.1.3.0] Generic Information: ignoreEvent Input Data : {Telephone=, Organization=Xellerate Users, Location=, Preferred Language=, Middle Name=, Xellerate Type=End-User Administrator, Title=, User ID=COETZETH, Manager ID=, Container DN=cn=Users, ssouid=, Status=Active, orclGuid=BA2694539E2C432F852460915924D067, [email protected], modifytimestamp=20120515192927z, Common Name=COETZETH, Role=Consultant, Server Name=OID IT Resource, TimeZone=, Department=, Last Name=Coetzee, First Name=Theuns} dateFormat : yyyy/MM/dd HH:mm:ss z
    [2012-05-15T22:55:11.792+02:00] [oim_server1] [NOTIFICATION] [IAM-5010000] [oracle.iam.reconciliation.impl.config] [tid: OIMQuartzScheduler_Worker-4] [userId: oiminternal] [ecid: 0000JTHLa8WBp20LVyCCyc1FgcIi000002,0] [APP: oim#11.1.1.3.0] Generic Information: Xellerate User from cache
    [2012-05-15T22:55:11.792+02:00] [oim_server1] [ERROR] [IAM-5010000] [oracle.iam.reconciliation.impl] [tid: OIMQuartzScheduler_Worker-4] [userId: oiminternal] [ecid: 0000JTHLa8WBp20LVyCCyc1FgcIi000002,0] [APP: oim#11.1.1.3.0] Generic Information: {0}[[
    oracle.iam.reconciliation.exception.ReconciliationException: Matching rule where clause is null
    at oracle.iam.reconciliation.impl.ReconOperationsServiceImpl.getMatchingRule(ReconOperationsServiceImpl.java:490)
    at oracle.iam.reconciliation.impl.ReconOperationsServiceImpl.ignoreEvent(ReconOperationsServiceImpl.java:390)
    at oracle.iam.reconciliation.impl.ReconOperationsServiceImpl.ignoreEvent(ReconOperationsServiceImpl.java:355)
    at Thor.API.Operations.tcReconciliationOperationsIntfEJB.ignoreEventx(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor1849.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
    at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy372.ignoreEventx(Unknown Source)
    at Thor.API.Operations.tcReconciliationOperationsIntfEJB_troehf_tcReconciliationOperationsIntfRemoteImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at Thor.API.Operations.tcReconciliationOperationsIntfEJB_troehf_tcReconciliationOperationsIntfRemoteImpl.ignoreEventx(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor1848.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
    at $Proxy169.ignoreEventx(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor1847.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
    at $Proxy356.ignoreEventx(Unknown Source)
    at Thor.API.Operations.tcReconciliationOperationsIntfDelegate.ignoreEvent(Unknown Source)
    at com.thortech.xl.integration.OID.schedule.tasks.tcTskOIDUserReconciliation.reconcileUser(Unknown Source)
    at com.thortech.xl.integration.OID.schedule.tasks.tcTskOIDUserReconciliation.processRecord(Unknown Source)
    at com.thortech.xl.integration.OID.util.tcUtilLDAPOperations.pagingReconSearch(Unknown Source)
    at com.thortech.xl.integration.OID.schedule.tasks.tcTskOIDUserReconciliation.doReconSearch(Unknown Source)
    at com.thortech.xl.integration.OID.schedule.tasks.tcTskOIDUserReconciliation.processChange(Unknown Source)
    at com.thortech.xl.integration.OID.schedule.tasks.tcTskOIDUserReconciliation.execute(Unknown Source)
    at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.execute(SchedulerBaseTask.java:384)
    at oracle.iam.scheduler.vo.TaskSupport.executeJob(TaskSupport.java:145)
    at sun.reflect.GeneratedMethodAccessor565.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at oracle.iam.scheduler.impl.quartz.QuartzJob.execute(QuartzJob.java:196)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
    [2012-05-15T22:55:11.794+02:00] [oim_server1] [ERROR] [] [XL_INTG.OID] [tid: OIMQuartzScheduler_Worker-4] [userId: oiminternal] [ecid: 0000JTHLa8WBp20LVyCCyc1FgcIi000002,0] [APP: oim#11.1.1.3.0] ====================================================
    [2012-05-15T22:55:11.794+02:00] [oim_server1] [ERROR] [] [XL_INTG.OID] [tid: OIMQuartzScheduler_Worker-4] [userId: oiminternal] [ecid: 0000JTHLa8WBp20LVyCCyc1FgcIi000002,0] [APP: oim#11.1.1.3.0] com.thortech.xl.integration.OID.schedule.tasks.tcTskOIDUserReconciliationException when reconciling COETZETH
    [2012-05-15T22:55:11.795+02:00] [oim_server1] [ERROR] [] [XL_INTG.OID] [tid: OIMQuartzScheduler_Worker-4] [userId: oiminternal] [ecid: 0000JTHLa8WBp20LVyCCyc1FgcIi000002,0] [APP: oim#11.1.1.3.0] ====================================================[[
    [2012-05-15T22:55:11.795+02:00] [oim_server1] [ERROR] [] [XL_INTG.OID] [tid: OIMQuartzScheduler_Worker-4] [userId: oiminternal] [ecid: 0000JTHLa8WBp20LVyCCyc1FgcIi000002,0] [APP: oim#11.1.1.3.0] ====================================================
    [2012-05-15T22:55:11.795+02:00] [oim_server1] [ERROR] [] [XL_INTG.OID] [tid: OIMQuartzScheduler_Worker-4] [userId: oiminternal] [ecid: 0000JTHLa8WBp20LVyCCyc1FgcIi000002,0] [APP: oim#11.1.1.3.0] Exception in OID:tcTskOIDUserReconciliation:reconcileUser() oracle.iam.reconciliation.exception.ReconciliationException: Matching rule where clause is null
    [2012-05-15T22:55:11.796+02:00] [oim_server1] [ERROR] [] [XL_INTG.OID] [tid: OIMQuartzScheduler_Worker-4] [userId: oiminternal] [ecid: 0000JTHLa8WBp20LVyCCyc1FgcIi000002,0] [APP: oim#11.1.1.3.0] ====================================================

    user10233157 wrote:
    Could anyone please explain to me how reconciliation and the various design console forms in OIM fit together? I am struggling to understand how resource objects, reconciliation fields, reconciliation action rules, reconciliation field mappings and reconcilaition rules all fit together... As for my original question, I have installed the OID connector and not made any modifications. I expected to see users created in OIM when running the trusted recon task.... When I run the target recon task existing users are associated with accounts in OID (as expected).Most times with OIM, following the documentation will not work. It requires knowledge of the product to find the missed steps, or missed pieces. You really need to get a baseline skill set with the product either through the Oracle By Examples or taking an Oracle University course. You are basically asking the community for all the answers but you haven't done your part.
    -Kevin

  • Need help with NULL values in Crosstables

    Hello everybody,
    I need some help with NULL values and crosstables. My issue is the following:
    I have a query (BW - MDX-Query) that gives me turnover measures for each month. In Crystal Reports I choose crosstable to display this whereby I put all month in columns and all turnover-measures in rows. Each month that has a value (measures are not empty) is chown in the crosstables rows. So far so good. The problem occures when there are month that actually have no values (measures are empty). In that case these months are not chown in columns. But I need CR to display these columns and show the value 0. How can I do that?

    Hi Frank,
    Cross tab shows the data based on your column and these column fields are grouped and based on the group it will show your summaries. 
    If there is no data for any of your group it will not display that group.  In this case you will have to create a standard report which should look like cross tab and to get zero values you need to write formulas .
    Example if you want to display Moth wise sales :
    if Month() = 01 Then
    sum() else 0
    Now this formula will check if your month is Jan, then it will sum up the values else it will display zero value. 
    This is possible only through standard report not with Cross Tab.
    Thanks,
    Sastry

  • How to create a dimension object in SAP BW Unv with Null value

    Hello,
    for query syncronisation task, I need a dimension object in my BW universe with NULL value. Does someone know, how to do it or if its possible?
    Regards,
    Thilo

    Hi Thilo,
    so the only common item is Material then - correct ?
    Query 1                                                                                Query 2
    Formulation (grouping of materials)                                                  (No counterpart)
    Material                                                                                Material
    dummy key figure (why?)                                                                Company Code
                                                                                    10 Keyfigure
    Is this something you regular have to do ? what about a MultiProvider ?
    did you try "merged dimensions" in the Web Intelligence Report ?
    Ingo

Maybe you are looking for

  • GPS System for MAC's

    I do a great deal of driving and am in the market for a GPS navigation system. I have a center console mount for my mac and would like to find the appropriate software to run a GPS system on the computer. I can find the software with the external usb

  • Norton warning after 7.3 install

    When i upgraded to the latest itune software i got a norton pop up that said itunes was listening for other computers trying to connect. i set it to block any connections to this program. will this prevent the activation of the iphone?

  • Personal Information iViews missing in Business Package for E.S.S.

    Hi all, we have imported the business package for Employee Self-Service (ERP2005, Release 1.0 for nw2004s) in our portal. The iViews for the application 'Personal Information' (like 'Address', 'Bank Information',...) are language dependent and in the

  • 'failed to initialise' and 'error 130200'

    Any advice gratefully received - able to install 9.3.4. But current update shows eror messages as above. Have uninstalled and sought to reinstall, same issues. OS is XP. Richard.

  • Where can I download the patchsets.sh ftp site is not working

    Hi Hussein the ftp site for the patchsets.sh is not working. ftp://ftp.oracle.com/support/outgoing/PATCHSET_COMPARE_TOOL/patchsets.sh thanks Reddy