Null values not equal

I'm writing some reports that are pulling possible duplicates out of a table. I have to base the query on several nullable columns in my table. I was tired of writting (a.column1 = b.column1 or (a.column1 IS NULL and b.column1 IS NULL)) for every column being compared so i wrote the following function:
CREATE OR REPLACE FUNCTION equivalent (
in_one     VARCHAR2,
in_two     VARCHAR2)
RETURN NUMBER IS
BEGIN
IF in_one = in_two THEN
     RETURN 1;
ELSIF in_one IS NULL AND in_two IS NULL THEN
          RETURN 1;
END IF;
     RETURN 0;
END equivalent;
Now I just pass equivalent(a.column1, b.column1) = 1. The problem is that this seems to take considerably longer. Does anybody know why or have a suggestion to speed things up?
Any help would be appreciated.
Thakns in advance,
Chris S.

There is always an overhead to calling PL/SQL. If you're running on 9i you could try compiling your function as native C; that way it will run almost as fast as kernel code. If you want to save yourself a bit of typing you could try this:
nvl(a.column1, 'Chris is ace!!') = nvl(b.column1, 'Chris is ace!!') Of course, you need to substitute some more buisness-like but equally non-valid phrase for 'Chris is ace!!'
- er - if you know what I mean. And it still won't use any indexes.
Cheers, APC

Similar Messages

  • KO23 Object currency assigned  value not equal Line item assigned value

    Dear all:
                    I have one problem.  Some Internal Order budget  use KO23  view about Object currency assigned value not equal Standard Reprt
    S_ALR_87013019 - List: Budget/Actual/Commitments  assign value.
    I don't knew what happen ?
    So I wish someone can give me a hand. Tel me how to fix this problem.
    thank you !

    Hi Jason,
    First of all:
    The displayed account code must be translated into the internally used code ("_SYS...") when using segmentation - when not using segemntation it is just internal code = displayed code.
    The code displayed is just a sample to give you a hint in case you are already familiar with the SAP Business One application.
    Therefore the sample code does not talk about where you got e.g. the value for FormatCode from ("FormatCode" is e.g. a field in table OACT where the account name with segments is (redundantly) stored without separators).
    The user should know on which account he/she wants to book a line on; maybe you might want to give some help to the user by displaying a dialog with suitable - or preselected accounts?
    In addition I am sure you know how to assign a string value to a string property - without explicitly writing it, right?
    HTH,
    Frank

  • FIXED type Attribute value not equal to the default

    Hi
    I am in the processing of doing AP Inbound process. During My process I have created Invoice XML and XSD and mapped with XML Gateway OAG XSD.
    BPEL able to pool the directory and process the XML file. But I am getting below error at XML Gateway error log.
    FIXED type Attribute value not equal to the default
    value ''.
    Could any body let me know when do I get normally this kind of error.
    Regards
    Kiran Akkiraju

    If you have imported the source code you could use a workaroud i have found. Create a new workspace and a new Project. In it create with the wizard a new Struts Controller Page Flow. After, create a action class, and some jsp pages.Then put some Struts components with the Components Palette.Be sure that in the newly created pages, jdeveloper has put the struts taglib. Now you can rebuild your project.
    It seems that jdeveloper does some internal libraries configuration, but when you import the source code, it doesn't do it.
    Hope it helps
    Nicolas Fonnegra M.

  • How to create list partition  Where value not equal

    Hi ,
    How to crate partition where i want to store all data what is not equal to ,priview values,(A,B,C,D,E) ?
    PARTITION PN001 VALUES (*is all values !=A,B,C,D,E*) TABLESPACE test_1Thanks !
    ID

    >
    In partition
    <partition_name> values (default) ? will be stored data where value is null too ?
    >
    See the VLDB partitioning guide
    http://docs.oracle.com/cd/E18283_01/server.112/e16541/part_admin001.htm#sthref247
    >
    Creating List-Partitioned Tables
    The semantics for creating list partitions are very similar to those for creating range partitions. However, to create list partitions, you specify a PARTITION BY LIST clause in the CREATE TABLE statement, and the PARTITION clauses specify lists of literal values, which are the discrete values of the partitioning columns that qualify rows to be included in the partition. For list partitioning, the partitioning key can only be a single column name from the table.
    Available only with list partitioning, you can use the keyword DEFAULT to describe the value list for a partition. This identifies a partition that accommodates rows that do not map into any of the other partitions.
    >
    Note the last two sentences above. The DEFAULT partition will contain data for values (including NULL) that do not map to other partitions.

  • NULL value not validated for a Required field

    Hi,
    I have added a MessageLovInput item to the expense header page (/oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG), and have made the Required Value to True. But I do not get any error when I navigate to the next page without populating the field. If I enter in incorrect information, it validates it against the LOV, but not for null values.
    Any pointers to make the field validate NULL values?
    Thanks,
    Ashish

    Yeah.. I can see the Required field indicator (*) next to the field. I have tried with all the values (uiOnly, ValidatorOnly, Yes etc.), but it does not validate NULL values.
    I'll try to handle this in the controller, but would prefer if this can be done by personalization.
    Ashish

  • Null values not getting

    Hi all,
    Below query is not getting null values. Please help me to get the null values.
    SELECT
    T5.name,
    T4.VOD_NAME,
    count(T6.ATTRIB_03)
    FROM
    SIEBEL.S_VOD_VER T1
    INNER JOIN VOD T2 ON T1.VOD_ID = T2.ROW_ID
    LEFT OUTER JOIN ISS_OBJ_DEF T3 ON T1.VOD_ID = T3.VOD_ID
    LEFT OUTER JOIN VOD T4 ON T3.PAR_VOD_ID = T4.OBJECT_NUM
    LEFT OUTER JOIN PROD_INT T5 ON T2.OBJECT_NUM = T5.CFG_MODEL_ID
    left outer join PROD_INT_XM T6 ON T5.row_id= T6.PAR_ROW_ID
    WHERE
    T4.vod_name = 'Componentes' and T1.CURR_VER_FLG='Y' and T3.last_vers = 0 and T6.TYPE = 'GALA_PROD_OPER'
    group by T5.name,T4.VOD_NAME having count(T6.ATTRIB_03) != 7
    Edited by: user9522927 on Jun 16, 2010 11:44 PM
    Edited by: user9522927 on Jun 16, 2010 11:44 PM

    Hi,
    As you do the inner join it will not retrieve the null rows.
    See the below illustration:
    SQL> select * from a;
    ID
    12
    12
    10
    11
    13
    7 rows selected.
    SQL> select * from b;
    ID
    12
    13
    45
    25
    36
    9 rows selected.
    ********* no null rows retrieved for inner join below ******************
    SQL> select a.id from a inner join b on a.id=b.id;
    ID
    12
    12
    13
    ********* null rows retrieved for outer join below **************
    SQL> select a.id from a left outer join b on a.id=b.id;
    ID
    12
    12
    13
    10
    11
    7 rows selected.
    Edited by: adnanKaysar on Jun 17, 2010 1:04 PM

  • Rounding off Issue (Net Value not equal to Net Price * quantity)

    Dear Gurus,
    Here is an interesting issue.The default calculation done in the pricing procedure is two decimal places.Now we consider a real scneario,consider the net value of 324 quantities of an item calculated is 36,049.86 .When it is divided by quantity  the resulting value of net price is 111.265 but the system shows 111.27 by rounding it off.
    Now here comes the problem,my client needs the rate to be shown on the order script to be two decimal places and the net value should be equal  quantity * net price.So if we apply this,
    324 * 111.27 = 36051.48
    But the net value calculated by the system is 36,049.86.So it can be consluded that:
    "Quantity * Net Price Shown is not Equal to Net Value calculated by the System"
    Need an urgent resolution,project is stuck on this
    Regards,
    Sam Ahmed
    Edited by: Lakshmipathi on Nov 3, 2011 12:14 PM
    Please dont add URGENT in subject or in your post

    Here is the pricing procedure,
    We start with the amount condition types
                                            Unit Price        Units Condition Value
    ZMRP     MRP                     1,700.00           10     PAC     55,080.00      
    ZTRP     Trade Price     1,445.00           10     PAC     46,818.00      
    ZDPR     Dist. Price     1,445.00           10     PAC     46,818.00         (GL)
    Using Trade Price we apply the product discount of 23%
    ZPRD     Product Discount     23.000-     %                    10,768.14-
    Then we send discount amount to the gl by using condition type ZDIS
    ZDIS      Discount Value     100.000-     %           10,768.14-      (GL)
    tHE RESULTING NET VALUE IS  36,049.86      as 46818.00 - 10,768.14
         Order Item value     111.27      1     PAC     36,049.86      
    And the Net Price is 111.27

  • Update Record Field if Value Not Equal

    Hello All,
    I am using Toad for Oracle 10. I have a MERGE INTO Process that updates tbl_requisition based on FK - fk_allotment_id that equals parent table tbl_allotment PK - pk_allotment_id. Both tables have create, update and deletes triggers. The process is executed when a Apply Changes/update button is clicked from tbl_allotment. So, all the record data from tbl_allotment updates tbl_requisition record if the fk and pk keys are equal. My problem is if a record is updated within tbl_requisition. Now the record from tbl_requisition is different from tbl_allotment. If any value is updated from tbl_allotment for the matching pk_allotment_id = fk_allotment_id record from tbl_requisition. tbl_allotment record data will override the updated value within tbl_requisition. I would like to only update the values that were updated/changed and are not equal from tbl_allotment to tbl_requisition. Can anyone assist me with this?
    Begin
    MERGE INTO tbl_requisition req
    USING tbl_allotment alt
    ON (req.fk_allotment_id = alt.pk_allotment_id)
    WHEN MATCHED THEN
    UPDATE SET
         req.FK_JOBCODE_ID = alt.FK_JOBCODE_ID,
         req.FK_JOBCODE_DESCR = alt.FK_JOBCODE_DESCR,
         req.FK_JOBCODE_PAYRANGE = alt.FK_JOBCODE_PAYRANGE,
         req.FK_PAY_RANGE_LOW_YEARLY = alt.FK_PAY_RANGE_LOW_YEARLY,
         req.FK_DEPARTMENT_ID = alt.FK_DEPARTMENT_ID,
         req.FK_DIVISION_ID = alt.FK_DIVISION_ID,
         req.FK_NUMBER_OF_POSITIONS = alt.NUMBER_OF_POSITIONS,
         req.FK_DEPARTMENT_NAME = alt.FK_DEPARTMENT_NAME,
         req.FK_DIVISION_NAME = alt.FK_DIVISION_NAME,
         req.REPORT_UNDER = alt.REPORT_UNDER;
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        dbms_output.put_line('No data found');
    End; Thanks for reading this thread and I hope someone can provide some assistance. If the create tables or anything is needed that is not a problem to provide.

    Thanks for responding Frank and providing the EXCEPTION information also. Here are my create tables and insert statement. I changed the child table from tbl_requisition to tbl_allotment_temp, same process though.
    CREATE TABLE  "TBL_ALLOTMENT"
       (     "PK_ALLOTMENT_ID" NUMBER,
         "FK_DEPARTMENT_ID" VARCHAR2(5),
         "FK_DIVISION_ID" VARCHAR2(100),
         "FK_JOBCODE_ID" NUMBER,
         "FK_JOBCODE_DESCR" VARCHAR2(100),
         "FK_JOBCODE_PAYRANGE" NUMBER(*,0),
         "FK_PAY_RANGE_LOW_YEARLY" NUMBER(*,0),
         "NUMBER_OF_POSITIONS" NUMBER,
          CONSTRAINT "PK_ALLOTMENT_ID" PRIMARY KEY ("PK_ALLOTMENT_ID") ENABLE
    CREATE TABLE  "TBL_ALLOTMENT_TEMP"
       (     "PK_ALLOTMENT_TEMP_ID" NUMBER,
         "FK_DEPARTMENT_ID" VARCHAR2(5),
         "FK_DIVISION_ID" VARCHAR2(100),
         "FK_JOBCODE_ID" NUMBER,
         "FK_JOBCODE_DESCR" VARCHAR2(100),
         "FK_JOBCODE_PAYRANGE" NUMBER(*,0),
         "FK_PAY_RANGE_LOW_YEARLY" NUMBER(*,0),
         "NUMBER_OF_POSITIONS" NUMBER,
          CONSTRAINT "PK_ALLOTMENT_TEMP_ID" PRIMARY KEY ("PK_ALLOTMENT_TEMP_ID") ENABLE
    INSERT INTO tbl_allotment
    (FK_DEPARTMENT_ID, FK_DIVISION_ID, FK_JOBCODE_ID, FK_JOBCODE_DESCR,
    FK_JOBCODE_PAYRANGE, FK_PAY_RANGE_LOW_YEARLY, NUMBER_OF_POSITIONS)
    values
    (00002, 0000220000, 100408, 'Revenue Analyst',
      2210, 38389, 5);Once data is created for tbl_allotment, this insert statement inserts the data to tbl_allotment_temp.
    INSERT INTO tbl_allotment_temp(
         PK_ALLOTMENT_TEMP_ID,
         FK_JOBCODE_ID,
         FK_JOBCODE_DESCR,
         FK_JOBCODE_PAYRANGE,
         FK_PAY_RANGE_LOW_YEARLY,
         FK_DEPARTMENT_ID,
         FK_DIVISION_ID,
         NUMBER_OF_POSITIONS)
        VALUES (
         :P3_PK_ALLOTMENT_ID,
         :P3_FK_JOBCODE_ID,
         :P3_FK_JOBCODE_DESCR,
         :P3_FK_JOBCODE_PAYRANGE,
         :P3_FK_PAY_RANGE_LOW_YEARLY,
         :P3_FK_DEPARTMENT_ID,
         :P3_FK_DIVISION_ID,
         :P3_NUMBER_OF_POSITIONS);Once any update occurs to tbl_allotment, this process updates tbl_allotment_temp based on temp.pk_allotment_temp_id = alt.pk_allotment_id.
    Begin
    MERGE INTO tbl_allotment_temp temp
    USING tbl_allotment alt
    ON (temp.pk_allotment_temp_id = alt.pk_allotment_id)
    WHEN MATCHED THEN
    UPDATE SET
         temp.FK_DEPARTMENT_ID = NVL (alt.FK_DEPARTMENT_ID, temp.FK_DEPARTMENT_ID),
         temp.FK_DIVISION_ID = NVL (alt.FK_DIVISION_ID, temp.FK_DIVISION_ID),
         temp.FK_JOBCODE_ID = NVL (alt.FK_JOBCODE_ID,    temp.FK_JOBCODE_ID),
         temp.FK_JOBCODE_DESCR = NVL (alt.FK_JOBCODE_DESCR, temp.FK_JOBCODE_DESCR),
         temp.FK_JOBCODE_PAYRANGE = NVL (alt.FK_JOBCODE_PAYRANGE, temp.FK_JOBCODE_PAYRANGE),
         temp.FK_PAY_RANGE_LOW_YEARLY = NVL (alt.FK_PAY_RANGE_LOW_YEARLY, temp.FK_PAY_RANGE_LOW_YEARLY),
         temp.NUMBER_OF_POSITIONS = NVL (alt.NUMBER_OF_POSITIONS, temp.NUMBER_OF_POSITIONS);
    End;Once the data is created within tbl_allotment the data is also inserted within tbl_allotment_temp. If tbl_allotment_temp.NUMBER_OF_POSITIONS value is changed from 5 to 10 is fine. The problem is when a update occurs within tbl_allotment and the updated field is not NUMBER_OF_POSITIONS. The changed field values from tbl_allotment should only update the field data within tbl_allotment_temp.
    UPDATE tbl_allotment_temp
    SET
    NUMBER_OF_POSITIONS = 10
    UPDATE tbl_allotment
    SET
    FK_JOBCODE_DESCR = 'Revenue Test'Now within tbl_allotment_temp only field FK_JOBCODE_DESCR should be updated to Revenue Test but my MERGE INTO process will update all the field values. So the updated NUMBER_OF_POSITIONS value 10 will now be 5. I would only like to update any changed value from tbl_allotment to tbl_allotment_temp. If any record value from tbl_allotment_temp was changed that value should not be updated from the MERGE INTO Process within tbl_allotment unless those values have been updated within tbl_allotment. Let me know if this is not clear so I can clarity more Frank.
    Edited by: Charles A on Aug 29, 2011 8:41 AM

  • Null values not allowed in object-parameter for esb proxy invocation

    When I create a proxy service for my esb webservice and try to invoke this service from my ADF Application I was always getting the exception 'unexpected null value for literal data'.
    I've figured out what went wrong through debugging the proxy-classes of the esb-service.
    You need to define an input-value for each attribute of which your object is constituted. After I've initialized each variable in the object, which is the input-parameter of my esb proxy, everything works fine.

    When I create a proxy service for my esb webservice and try to invoke this service from my ADF Application I was always getting the exception 'unexpected null value for literal data'.
    I've figured out what went wrong through debugging the proxy-classes of the esb-service.
    You need to define an input-value for each attribute of which your object is constituted. After I've initialized each variable in the object, which is the input-parameter of my esb proxy, everything works fine.

  • Null values not displaying in the LOV on the parameter form.

    My report works perfect while in Oracle Reports 10g, however when I move it to our menu (Oracle Forms 10g) it does not display the null in the LOV on the parameter form.
    This report allows the the user to select by inspector or district or everyone for certain dates.
    Ex: I have 4 parameter fields. The user must enter the start & end dates and either the Inspector or the district or leave the inspector or district null to run for everyone.
    The district LOV is :
    select dnr_section_code, description from dnr_section_code where dnr_section_code in ('29', '38','52')
    UNION
    select null, 'All' from dual
    order by 2 asc ;
    The inspector LOV is:
    select null , 'All' from dual
    UNION
    select person_seq, first_name||' '||last_name inspector from vw_eng_inspectors
    order by 2 asc
    In my Data Model query I use the :
    My select
    from tables
    where clause
    +
    ----by inspector
    and (prod_fac_inspections.person_seq_inspector =
    nvl(:inspector,prod_fac_inspections.person_seq_inspector))
    ---by district
    and
    (d.dnr_section_code = nvl(:district,d.dnr_section_code)
    and d.person_seq = prod_fac_inspections.person_seq_inspector)
    Again, it works perfect in Reports! It eliminates having 3 reports on the menu. This one report gives the user the option of selecting dynamic parameters.
    Also, I got so frustrated, that I went a different route of using a default where.
    I am stuck with the error of ORA:00933 SQL command not ended properly
    1=1
    I set the initial value to 1=1 and it does not like it.
    I am stuck!
    DB = Oracle Database 10g Enterprise Edition Release 10.2.0.2.0

    Hi Krishna,
    I'm not sure I understand the probelm.
    A progress bar control only displays numeric values. When do you mean by "unassigned values"? What would you expect to be presented?
    Best regards,
    Udi

  • Null values not returned

    Friends it is strange that when I run a query like
    SELECT * FROM EMPLOYEE_TABLE WHERE EMP_DEPT_CODE != '01'
    doesnt return me records with EMP_DEPT_CODE = null ...which I thought is not = '01' !!
    Please tell me why is this happening.I am looking for materials and they are not at all helpful.
    Thanks
    MS

    NULL is not equivalent to != '01' because a NULL is unknown
    Here's an exercise
    SQL> select * from test_1;
    FLD1
    01
    02
    03
    4 rows selected.
    SQL> select * from test_1 where fld1 !='01';
    FLD1
    02
    03
    2 rows selected.
    SQL> select * from test_1 where nvl(fld1,'99') != '01';
    FLD1
    02
    03
    3 rows selected.
    SQL>

  • Invoicing Plan Net Value not equals to Ordered Value

    Dear Xperts,
    Need your advice.
    Is it SAP standards, when an invoicing plan BPO is created with reference to an outline agreement the net value at the outline agreement (header statistic) is taken from the BPO net value (Quantity X Price) NOT BPO ordered value (Quantity X Price X Months).
    Scenario Simulated:
    (1)     Contract Detail (value contract)
    Target Value = RM12,000 (price RM1000 ; 12 months validity)                                                                     
    (2)     Purchase Order
    Quantity = 1 pcs ; Price = RM1000 ; Invoicing Plan = 12 months
    Ordered Value = RM 12,000
    Net Value = RM1000
    As a result the utilization value (contract header statistic) is:
    Target Value : RM12,000
    Net Value : RM1000.
    This will lead to a misleading info of utilization value of the contract.
    Your experts explaination is highly appreciated.

    Anybody?

  • How can we filter a character "not equal to" to a certain value?

    hi,
    we have a set of values to characterstic.
    we want to display values not equal to...."xyz" in the query. how to do it

    hello,
    i am trying to change a group box text dynamically, what are the settings i need to make on the screen side and program side could you explain me with a code...?
    thanks
    or tell me where should i post this doubt?

  • Using Convert to handle NULL values for empty Strings ""

    After having had the problem with null values not being returned as nulls and reading some suggestion solution I added a converter to my application.
      <converter>
        <converter-id>NullStringConverter</converter-id>
        <converter-for-class>java.lang.String</converter-for-class>
        <converter-class>com.j2anywhere.addressbookserver.web.NullStringConverter</converter-class>
      </converter>
    ...I then implemented it as follows:
      public String getAsString(FacesContext context, UIComponent component, Object object)
        System.out.println("Converting to String : "+object);
        if (object == null)
          System.out.println("READING null");
          return "NULL";
        else
          if (((String)object).equals(""))
            System.out.println("READING null (Second Check)");
            return null;       
          else
            return object.toString();
      public Object getAsObject(FacesContext context, UIComponent component, String value)
        System.out.println("Converting to Object: "+value+"-"+value.trim().length());
        if (value.trim().length()==0 || value.equals("NULL"))
          System.out.println("WRITING null");
          return null;
        else
          return value.toUpperCase();
    ...I can see that it is converting my values, however the object to which the inputText fields are bound are still set to empty strings ""
    <h:inputText size="50" value="#{addressBookController.contactDetails.information}" converter="NullStringConverter"/>Also when reading the object values any nulls are already converted to empty strings before ariving at the converter. It seems that there is a default converter handling string values.
    How can I resolve this problem as set nulls when the input value is an empty string other then checking every string in my class individually. I would really hate to pollute my object model with empty string tests.
    Thanks in advance
    Edited by: j2anywhere.com on Oct 19, 2008 9:06 AM

    I changed my converter as suggested :
      public Object getAsObject(FacesContext context, UIComponent component, String value)
        if (value == null || value.trim().length() == 0)
          if (component instanceof EditableValueHolder)
            System.out.println("SUBMITTED VALUE SET TO NULL");
            ((EditableValueHolder) component).setSubmittedValue(null);
          else
            System.out.println("COMPONENT :"+component.getClass().getName());
          System.out.println("Converting to Object: " + value + "< to " + null);
          return null;
        System.out.println("Converting to Object: " + value + "< to " + value);
        return value;
      }which produces the following output :
    SUBMITTED VALUE SET TO NULL
    Converting to Object: < to null
    Info : The INFO line however comes from my controller object where I print out the set value :
    package com.simple;
    import java.util.ArrayList;
    import java.util.List;
    public class Controller
      private String information;
      /** Creates a new instance of Controller */
      public Controller()
        System.out.println("Createing Controller");
        information = "Constructed";
      public String process()
        System.out.println("Info : "+getInformation());
        return "processed";
      public String reset()
        setInformation("Re-Constructed");
        System.out.println("Info : "+getInformation());
        return "processed";
      public String setNull()
        setInformation(null);
        System.out.println("Info : "+getInformation());
        return "processed";
      public String getInformation()
        return information;
      public void setInformation(String information)
        this.information = information;
    }I also changes my JSP / JSF page a little. Here is the updated version
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%--
        This file is an entry point for JavaServer Faces application.
    --%>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
      </head>
      <body>
        <f:view>
          <h:form>
            <h:inputText id="value" value="#{Controller.information}"/>
            <hr/>
            <h:commandLink action="#{Controller.process}">
              <h:outputText id="clicker" value="Process"/>
            </h:commandLink>             
            <hr/>
            <h:commandLink action="#{Controller.reset}">
              <h:outputText id="reset" value="Reset"/>
            </h:commandLink>             
            <hr/>
            <h:commandLink action="#{Controller.setNull}">
              <h:outputText id="setNull" value="Set Null"/>
            </h:commandLink>             
          </h:form>
        </f:view>
      </body>
    </html>The converter is declared for the String class in the faces configuration file. From the log message is appears to be invoked, however the object is not set to null.
    I tested this with JSF 1.2_04-b20-p03 as well as 1.2_09-b02-FCS.
    any other suggestions what could be causing this.

  • Duplicate NULL values

    Hi Experts,
    It's a challenging question to all experts
    Q1)
    If we create an UNIQUE Key on a table Why it's accepting morethan one NULL value.
    Q2)
    If we use DISTINCT key word on a column that contains morethan one NULL value why it's displaying one NULL value.
    Q3)
    If we use UNION on a column that contains morethan one NULL value, why it returns one NULL value.
    Q4)
    If we write a query like this
    SELECT * FROM emp WHERE comm IS NULL
    Why it returns all the employes those contain no comm.
    For 1st question some pleople are answering any NULL is not equal to other NULL value so that it accepting multiple NULL values.
    For 2nd,3rd question some people are answering because DISTINCT and UNION eliminates duplicate values.
    According to the first question answer how it is possible.
    For 4th question answer some people are saying all the NULLs are equal so that it displaying all the employess which are having no commision.
    Any One Plese help how NULL works in all four scenarios.
    Thanks in advance.

    user9077483 wrote:
    Hi Experts,
    It's a challenging question to all experts
    Q1)
    If we create an UNIQUE Key on a table Why it's accepting morethan one NULL value.It depends really. Are you talking a SINGLE COLUMN unique index? If so, Oracle won't index the NULLs values, hence you can put in as many as you want.
    If it's a concatenated INDEX then the number of NULL values may be limited. See below for an example:
    SQL> CREATE TABLE TEST(TXT VARCHAR2(10), TXT2 VARCHAR2(10));
    Table created.
    SQL> CREATE UNIQUE INDEX TEST_TXT_UNQ ON TEST(TXT);
    Index created.
    SQL> INSERT INTO TEST(TXT) VALUES(NULL);
    1 row created.
    SQL> INSERT INTO TEST(TXT) VALUES(NULL);
    1 row created.
    SQL> CREATE UNIQUE INDEX TEST_TXT_UNQ2 ON TEST(TXT,TXT2);
    Index created.
    SQL> INSERT INTO TEST(TXT,TXT2) VALUES('A',NULL);
    1 row created.
    SQL> INSERT INTO TEST(TXT,TXT2) VALUES('A',NULL);
    INSERT INTO TEST(TXT,TXT2) VALUES('A',NULL)
    ERROR at line 1:
    ORA-00001: unique constraint (TUSER.TEST_TXT_UNQ) violated
    Q2)
    If we use DISTINCT key word on a column that contains morethan one NULL value why it's displaying one NULL value.Per the definition of DISTINCT:
    Specify DISTINCT or UNIQUE if you want the database to return only one copy of each set of duplicate rows selected. These two keywords are synonymous. Duplicate rows are those with matching values for each expression in the select list.It returns only one copy of a ROW even if a column in a row contains NULLs.
    >
    Q3)
    If we use UNION on a column that contains morethan one NULL value, why it returns one NULL value.For the same reason as above UNION removes duplicates. Use UNION ALL if you want duplicate values.
    >
    Q4)
    If we write a query like this
    SELECT * FROM emp WHERE comm IS NULL
    Why it returns all the employes those contain no comm.Because you asked it to? The IS NULL condition is special in that it checks the column to see if it contains a NULL value. If it is the condition evaluates to true. You can't use WHERE COMM = NULL because you can't use an equality operator to compare NULL values.

Maybe you are looking for