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.

Similar Messages

  • Suppressing NuLL values in Crystal Report

    Hi....
    I m facing a problem,i use asp.net and  I have designed a Crystal Report.I had to place Text Objects in the the details section along with the corresponding Records from Database as per the Reports Design needed. Now i want that the NULL values in the report should be suppressed and should be disappeared  along with the static Text Objects. Like as it happens in Grid view in ASP .net
    Please Help me to solve this issue..
    Thank you

    I think i have been able to do it with little compliated suppress logic.
    When i design the report this is how it looks in design mode:
    Line1  Field1
    Line2  Field2
    Line3  Field3
    and when Field 2 is null or contains a blank string the output should look like:
    Line1  Field1
    Line3  Field3
    1. Initially just design the text fields and db fields without any suppress.
    2. Check Suppress for Line 2 and use the formula: isnull({Table.Field2}) . Do nothing to Field2. This should suppress Line2 when Field2 is null, you can also add StrCmp({Table.Field2}, "") = 0 for checking blank strings.
    3. Now copy Object Line3 and Field3 and place on top of Line2 and Field2 respectively so that their positions match. Let these newly copied objects be Line3_1 and Field3_1 respectively.
    4. Line3_1 and Field3_1 should be suppressed if Field2 contains a non null value. So for both of them Click Suppress checkbox and add the following in the format formula editor not isnull({Table.Field2})
    5. If Line3_1 and Field3_1 are visible = Field2 is null\empty -> Line3 and Field3 should be suppressed or the output would be like:
    Line1 Field1
    Line3 Field3
    Line3 Field3
    So to remove the duplicate:
    For both of them Click Suppress checkbox and add the following in the format formula editor isnull({Table.Field2})
    Hope this helps. I will see if I can attach a sample report based on xtreme here.

  • Unable to enter NULL value records

    Hi experts,
    I need to upload a excel sheet data to mdm .
    details of name and class.
    Name(DF)     Class
    Tom     one
    jane     two
    dorsan     
    rudy     
    tej     three
    zindal     
    there are NULL values(Blank) for customers - dorsan, rudy, zindal.
    in matching records i selected both name and class then imported the data.
    i can see the following in Data manager..
    Name(DF)     Class
    Tom     one     
    jane     two     
    tej     three     
    zindal          
    Can any one tell me why only four records are imported?
    Regards
    Phani

    Dear Phani
    This is required as the combination should be treated as the Unique key for the table otherwise for the entries where we same say NULL values are considered as duplicates by MDM. Selecting both the fields is with OR condition and combining them is with AND condition.
    Please close the thread if answered.
    best regards
    Ravi

  • Geting null values from request

    hi!
    i m producing this code through out.println() method in my page and then using java script
    i am submiting this page to another page
    <td width="56%"><textarea name="question_no_1"></textarea></td>
    <input name="question_no_1_radio1" type="radio" value="radio"></td>
    <td width="59%"> <textarea name="question_no_1_ans1"></textarea></td>
    <input type="radio" name="question_no_1_radio2" value="radio"></td>
    <td><textarea name="question_no_1_ans2"></textarea></td>
    <input type="radio" name="question_no_1_radio3" value="radio"></td>
    <td><textarea name="question_no_1_ans3"></textarea></td>
    <input name="question_no_1_radio4" type="radio" value="radio"></td>
    <td><textarea name="question_no_1_ans4"></textarea></td>
    but when i submit it to the other page and try to retrieve value of parameter "question_no_1"
    through the bellow statement it shows a null value but i have given a value previously by
    typing a question in it
    System.out.println("the Body Of The First Question Is "+request.getParameter("question_no_1"));
    can anybody help me what is going on here.
    also if i try to normaly submit first page (ie <form="form1" method="post" action="other_jsp_page.jsp"> ) then the statement in the next page gives me the correct value but
    i have to submit the first paper through java script.
    if u want to see full detail of my code then go to the following link
    http://forum.java.sun.com/thread.jsp?thread=309254&forum=45&message=1237097
    thanx in advance

    OK, your problem is that you are not submmiting the values to the other page. When you do the
    --> document.forms[0].submit();
    in JavaScript, the form has to action defined
    --> <form name="form1" method="" action="">
    So, the page does nothing. The line following the submit just changes the location of the page, IT DOES NOT POST the values.
    One solutions is the following:
    1.- define an action for your form:
    <form name="form1" method="POST" action="'save_paper.jsp">
    2.- Then create a JavaScript function that validates the fields and simply return "true" if the form is correct, and false if there is a problem (just a little modification of the one you have).
    3.- Then modify your submit button:
    Instead of:
    <input type="button" name="Save" value="Save" onClick="validateField()">
    Try:
    <input type="SUBMIT" value="Save" onclick="validateField();">

  • Not to display the null values from data base

    Hiiii.
    In a jsp file i have ten check boxes.The jsp file is mapped to a servlet file for parameter requesting and to
    store it in DB.
    The unchecked box values has null values.All the values are store in a Mysql DB table.
    Again i have to display it in a jsp page from table.
    The problem am facing was,how can i display only the values in a row.it must not display the null values and the crresponding column name.
    Or any other way is their like below
    How i can retrieve only the selected check boxes from tht jsp file.and store in backend.
    Thanks in Advance
    regards,
    satheesh kannan

    Here is a rough example that may give you some ideas:
    On the JSP page:
    <%if(myData.getFirstName()!=null){%>
    Your First Name'
    <input type="text" name="firstName" value="<%=myData.getFirstName()%>">
    <%}%>
    In the servlet:
    String firstName= request.getParameter("firstName");
    if(firstName!=null){
    //write it to the database
    }

  • 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.

  • Index (or not) for excluding NULL values in a query

    Hello,
    I have table that can become very large. The table has a varchar2 column (let's call it TEXT) that can contain NULL values. I want to process only the records that have a value (NOT NULL). Also, the table is continuously expanded with newly inserted records. The inserts should suffer as little performance loss as possible.
    My question: should I use an index on the column and if so, what kind of index?
    I have done a little test with a function based index (inspired by this Tom Kyte article: http://tkyte.blogspot.com/2006/01/something-about-nothing.html):
    create index text_isnull_idx on my_table(text,0);
    I notice that if I use the clause WHERE TEXT IS NULL, the index is used. But if I use a clause WHERE TEXT IS NOT NULL (which is the clause I want to use), a full table scan is performed. Is this bad? Can I somehow improve the speed of this selection?
    Thanks in advance,
    Frans

    I build a test case with very simple table with 2 columns and it shows that FTS is better than index access even when above ratio is <= 0.01 (1%):
    DROP TABLE T1;
    CREATE TABLE T1
               C1 VARCHAR2(100)
              ,C2 NUMBER
    INSERT INTO T1 (SELECT TO_CHAR(OBJECT_ID), ROWNUM FROM USER_OBJECTS);
    BEGIN
         FOR I IN 1..100 LOOP
              INSERT INTO T1 (SELECT NULL, ROWNUM FROM USER_OBJECTS);
         END LOOP;
    END;
    CREATE INDEX T1_IDX ON T1(C1);
    ANALYZE TABLE T1 COMPUTE STATISTICS
         FOR TABLE
         FOR ALL INDEXES
         FOR ALL INDEXED COLUMNS
    SET AUTOTRACE TRACEONLY
    SELECT
              C1, C2
         FROM T1 WHERE C1 IS NOT NULL;
    3864 rows selected.
    real: 1344
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=59 Card=3864 Bytes=30912)
       1    0   TABLE ACCESS (FULL) OF 'T1' (Cost=59 Card=3864 Bytes=30912)
    Statistics
              0  recursive calls
              0  db block gets
           2527 consistent gets
           3864 rows processed
    BUT
    SELECT
         --+ FIRST_ROWS
              C1, C2
         FROM T1 WHERE C1 IS NOT NULL;
    3864 rows selected.
    real: 1296
    Execution Plan
       0      SELECT STATEMENT Optimizer=HINT: FIRST_ROWS (Cost=35 Card=3864 Bytes=30912)
       1    0   TABLE ACCESS (BY INDEX ROWID) OF 'T1' (Cost=35 Card=3864 Bytes=30912)
       2    1     INDEX (FULL SCAN) OF 'T1_IDX' (NON-UNIQUE) (Cost=11 Card=3864)
    Statistics
              0  recursive calls
              0  db block gets
           5052 consistent gets
           3864 rows processed
    and just for comparison:
    SELECT * FROM T1 WHERE C1 IS NULL;
    386501 rows selected.
    real: 117878
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=59 Card=386501 Bytes=3092008)
       1    0   TABLE ACCESS (FULL) OF 'T1' (Cost=59 Card=386501 Bytes=3092008)
    Statistics
              0  recursive calls
              0  db block gets
         193850 consistent gets
         386501 rows processedHence you have to benchmark you queries with and w/o index[es]

  • Null values passed into the servlet

    Hi all,
    I keep getting null values for all the params that I pass into the servlet i.e. sqltype, producttype, process, instance etc....I have attempted to print some of them out on the screen but I keep getting the 'NullPointerException' error message...can anyone tell me what it is that I have down wrong in the below code?
    If I run the servlet with method calls that have hardcoded arguments in them it works but not when I pass in the params from the URL...I am absolutley puzzled!
    Help!
    package blotter;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.Date;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import com.db.util.WriteToLogFile;
    import blotter.cache.*;
    Servlet to extract an object that has already been placed
    in the cache by GetBondPrices servlet from the cache.
    public class ExtractSecurityObject extends HttpServlet
         String sqlType = "";
         String productType = "";
         String instance = "";
         String process = "";
         String asOfDate = "";
         String currencyCode = "";
         String curveId = "";
         String results = "";
         private String debug;
    private PrintWriter out;
         private WriteToLogFile logFile;
         // called when servlet first initialised
         public void init(ServletConfig config) throws ServletException
              super.init(config);
         // method called for each get request
         public void doGet( HttpServletRequest request, HttpServletResponse response )
                   throws ServletException, IOException
              String toWrite = " ";
    // Get the object identifier from the parameters passed in
              sqlType = request.getParameter("sqltype");
    productType = request.getParameter("producttype").toUpperCase();
              instance = request.getParameter("instance");
              process = request.getParameter("process");
              asOfDate = request.getParameter("asofdate");
              curveId = request.getParameter("curveid");
              currencyCode = request.getParameter("ccy").toUpperCase();
              out.println(currencyCode);
              if ( request.getParameter("debug") !=null)
                   debug = request.getParameter("debug");
              else
                   debug ="";
              // set the mime type to html
    response.setContentType( "text/html" );
    out = response.getWriter();
    out.println("<HTML>");
              try
              // write some parameters to a log file
              toWrite = toWrite + "<li>" + getServletInfo() + " at " + new Date() + " " + sqlType + " " +
                        productType + " " + instance + " " + process + " " + asOfDate + " " + curveId + " " +
                        currencyCode;
         CachedObject o1 = (CachedObject)CacheManager.getCache("EB_" + currencyCode + productType + asOfDate);
    if(o1 == null){
              CacheSecurityObject cso = new CacheSecurityObject();
                   if((request.getParameter("sqltype") == null) && (request.getParameter("instance") != null)){
    results = (String)cso.putSecurityinCache(null, request.getParameter("producttype"), request.getParameter("instance"), request.getParameter("process"), request.getParameter("asOfDate"), request.getParameter("curveId"), request.getParameter("currencyCode"));
    //results = (String)cso.putSecurityinCache(null, "yc", "frafu", "official", "20011105", "baceod", "sek");
    out.println(results);
                   } else {
    //results = (String)cso.putSecurityinCache("bondtypes", "bond", null, "official", "20011105", "baceod", "eur");
    results = (String)cso.putSecurityinCache(request.getParameter("sqltype"), request.getParameter("producttype"), null, request.getParameter("process"), request.getParameter("asOfDate"), request.getParameter("curveId"), request.getParameter("currencyCode"));
    out.println(results);
              else{
                   out.println(((String)o1.object).toString());
    // general catch for all exceptions
              catch(Exception exception)
                   out.println( "Exception: The item that you requested was not found in the cache" + "<BR>" );
                   toWrite = toWrite + "Exception : " + exception.getMessage() + "\n" ;
              finally
    // write to logfile
              logFile = new WriteToLogFile();
              logFile.setSourceDirName("blotter");
              logFile.setQuery(request.getQueryString());
              logFile.setServletPath(request.getServletPath());
              if (toWrite!=null)
              logFile.writeLog(getServletInfo(),toWrite);
    out.println("</HTML>");
              out.close();
         // need the class name for log file
         public String getServletInfo()
         return this.getClass().getName();
    }

    That section of the code references a cache to extract an item that has been requested by the user. If the item is not in the cache i.e. if(o1 == null) then it will call a class that generates that object and places that object into the cache. The second time the user makes the same call then they will be handed a cached copy of that object which is aimed to make the whole servlet call faster.
    That section of the code works fine coz I have tested that separately. It is the reading in of the arguments that is causing the problem.

  • How to validate if a column have NULL value, dont show a row with MDX

    Hello,
    I have this situation, I have a Result from MDX that return rows with values NULL on columns, I tried with NON EMPTY and NONEMPTY but the result is the same. That I want to do is validate if a column have a Null value discard the row, but I dont know how
    to implement it, could somebody help me?, please.
    Thanks a lot.
    Sukey Nakasima
    Sukey Nakasima

    Hello,
    I found the answer in this link https://social.technet.microsoft.com/Forums/sqlserver/en-US/f9c02ce3-96b2-4cd6-921f-3679eb22d790/dont-want-to-cross-join-with-null-values-in-mdx?forum=sqlanalysisservices
    Thanks a lot.
    Sukey Nakasima
    Sukey Nakasima

  • How to differentiate the EMPTY Records and Null Values in DSO

    Hello....how is everyone here?? Ehehehe!
    I try to load some data from the flat file which contains some EMPTY data and Null Values for the records. The data type for the InfoObjects of the fields "Quantity" is "number". The sample data from the flat file (CSV) are as below:
    Food              Quantity
    Hamburger  -       12
    Cheese        -       0
    Vegetable      -               (Empty)
    When I try to load the above sample data to the DSO, I get the results of the data as follow:
    Food              Quantity
    Hamburger     - 12.000
    Cheese           -  0.000
    Vegetable         - 0.000
    In this case, how can the user differentiate whether the records is contain empty value of null values in DSO? This is kinda of hard to differentiate the both scenarios above. Is there any way to differentiate the scenarios described here?
    Thanks alot =)

    Hi Fluffy,
    It depends on the initial values of the data type
    The inital values For quantity/Currency/ Numbers it takes spaces as 0
    for char it is SPACE
    We cannot differeniate between space and null values.
    IF you have to force this then define quantity as char and load the data. we will not have units and aggregation in this case.
    Hope this helps.
    PV

  • Distinguishing between empty string and null values

    hi all,
    I am using an ODBC connection to connect my java app to database using JDBCODBC driver. I have 2 columns 'aColumn' and 'bColumn' in my table, both allow null values. I have one row in it, which has null value in aColumn and empty string in bColumn. I retrieve this row's data and assign it to 2 columns : 'aColumnVar' and 'bColumnVar' respectively. I find out that both 'aColumnVar' and 'bColumnVar' variables has null values (although bColumnVar should has an empty string as its value). Now my ODBC connection Data Source has the option "Use ANSI nulls, paddings, and warnings" ON. I turn it off and try again. This time both 'aColumnVar' and 'bColumnVar' variables has empty string as values (although aColumnVar should has null as its value).
    How can I make sure that i can get the data exactly as it is in the database in my variables?
    Thanks

    there is a wasNull() method on ResultSet. After you
    have obtained the value of a column e.g. by calling a
    method like getString you can call wasNull and if it
    returns true then the value on the database is null.
    Check the java docs, it might explain it better
    http://java.sun.com/j2se/1.4.1/docs/api/java/sql/Result
    et.html#wasNull()I am using MS SQL Server 7.0 under Windows NT 4.0 with JDK 1.2. My ODBC connection Data Source has to have the option "Use ANSI nulls, paddings, and warnings" ON.
    I try the wasNull() method but it is doing the same thing i.e. telling me that a column is null when in database it is null (right); and a column is null when in database it is an empty string (wrong). I suspect it is something to do with the JDBC-ODBC driver I am using.

  • Reading Numeric UDF null value in DI

    We have a UDF of Numeric(4) that can be NULL, 0, 1, 2, etc. We try to read it from DI, and if it is NULL, then set the result to be -1 (the default value we difined), so we can differentiate NULL and 0.
    The C# code we have look like this:
    int LineNumber = -1;
    SAPbobsCOM.Company oCompany;
    // Code to get Company
    SAPbobsCOM.Documents oDoc = oCompany.GetBusinessObject(BoObjectTypes.oQuotations);
    oDoc.GetByKey(100); // Get the document by DocEntry
    LineNumber = (int)oDoc.UserFields.Fields.Item("U_XX_LN").Value;
    The problem is LineNumber gets 0 even if in the database U_XX_LN is NULL. We tried the code below and got the same result because oDoc.UserFields.Fields.Item("U_XX_LN").Value.ToString() always return '0' if it is NULL.
    if (string.IsNullOrEmpty(oDoc.UserFields.Fields.Item("U_XX_LN").Value.ToString()))
        LineNumber = -1;
    else
        LineNumber = (int)oDoc.UserFields.Fields.Item("U_XX_LN").Value;
    The question is: how can we set it to default -1 if in the database the value is NULL?
    Thank you,
    Grace

    Hi Grace,
    Unfortunately the DI API automatically converts database null values to a default value for the datatype (eg null for numeric becomes 0 and null for strings is an empty string). If you want to differentiate between null and zero you will need to query the table using the isnull command rather than reading the table through the UserTables object:
    oRecordSet.DoQuery("select isnull(U_XX_LN, -1) as U_XX_LN from [@MYTABLE] where Code = 'MYCODE')
    This will convert the null value to a -1 in the recordset so you can tell the difference between nulls and zeros.
    Kind Regards,
    Owen

  • Null value handling in LOVs

    Has null value handling improved any in HTMLDB 1.6?
    If my LOV has "Display null"=Yes (default null value is %null%) and I need to pass in a database NULL to a After Submit process, I need to do add a After Submit computation for each of these LOVs with something like
    CASE WHEN :P1_ITEM='%null%' THEN NULL ELSE :P1_ITEM END
    I have a couple dozen LOVs on a page and it is getting tiring to go and do this on each and every one!
    Is there a better way?
    Thanks

    Hi Patrick,
    we are currently moving over to Apex 4.02 and are doing some smoke tests on our existing apps.
    I have come across an issue with your generic solution to the %null% issue above (incidently, for a long time it's the first piece of code I include when I start a new app... thank you!)
    We found that a lot of our SQL Query (PL/SQL function body returning SQL query) reports were failing due to the session state of the LOVs still having a session state of %null% even after the RemoveNulls application process had run.
    After debugging your generic process we found that the LOV_NULL_VALUE in the APEX_APPLICATION_PAGE_ITEMS view has changed from NULL to '%null%'.
    so the fix was as below:-
    BEGIN
        FOR rItem IN
          ( SELECT ITEM_NAME
              FROM APEX_APPLICATION_PAGE_ITEMS
             WHERE APPLICATION_ID   = TO_NUMBER(:APP_ID)
               AND PAGE_ID          IN (TO_NUMBER(:APP_PAGE_ID), 0)
               AND LOV_DISPLAY_NULL = 'Yes'
               AND LOV_DEFINITION   IS NOT NULL
    -- change here
               AND LOV_NULL_VALUE  = '%null' || '%'
        LOOP
            IF V(rItem.ITEM_NAME) = '%null' || '%'
            THEN
                Apex_Util.set_session_state(rItem.ITEM_NAME, NULL);
            END IF;
        END LOOP;
    END;Cheers,
    Gus.. (always a fan of your work!)

  • Null Values from a Data Source

    This is more of an implementation question than a
    troubleshooting question. Also, since I've been unable to find any
    documentation on this I was wondering if anyone has come across
    this behavior or found a bug with it.
    Yesterday I was working on an application to explore some
    proof of concept aspects of Flex for an application I'm developing.
    I started running into a problem with Flex Data Services throwing
    back an 'Unknown Property: "clientaddress1"' error whenever I tried
    to update data. It seemed that whenever I tried to update a record
    in the database it would thrown the Unknown Property error. I spent
    a good chunk of the day trying to figure out what was causing this
    and finally gave up and called it a day.
    This morning I was reassessing what the problem was and
    trying to find the differences between my database and my code and
    I stumbled upon the fact that I could add no records and modify
    them without a problem, however if I tried to access an existing
    record and update it I'd get the Unknown Property error.
    I start analyzing the database and found that I'd configured
    the database to use null values for empty values and the records
    that I created with the database had null values, however, any of
    the values inserted from Flex were inserted as blank values. As
    matching my action script class as clientaddress1 = ""; So, upon
    further testing I fould that Flex was not processing the null
    values correctly, so that when it came back and rightly generated a
    Conflict Error...and then called AcceptServer() it was unable to
    find the clientaddress1 property of the class.
    Also, if any of the properties in the database are null it
    throws the same error. Basically it seems to have invalidated the
    object just because one value was null. So if all of my values from
    the DB are set to something and only one field is set to null it's
    still throwing the error on the first alphabetical item of the
    properties.
    I can resolve the problem by not using null values in the
    database, but...what sort of effect would this have on someone
    working with a large legacy database that extensively uses nulls
    for undefined values?
    Also, if a Flex guru could explain the reasoning for this
    happening I would greatly appreciate it!
    Best regards,
    Chris Maloney

    I realize that I didn't clarify that I am using ColdFusion
    for getting the data. This class was generated by the Create CFC
    wizard in Flex Builder.
    package com.generated
    [Managed]
    [RemoteClass(alias="components.generated.clients.Clients")]
    public class Clients
    public var clientid:Number = 0;
    public var clientfirstname:String = "";
    public var clientlastname:String = "";
    public var clientaddress1:String = "";
    public var clientaddress2:String = "";
    public var clientcity:String = "";
    public var clientstate:String = "";
    public var clientzip:String = "";
    public var clientphone:String = "";
    public var clientemail:String = "";
    public function Clients()
    }

  • Null values in Numeric fields of Datasets

    I am wondering if anyone has run into this problem before and
    checking to see if anyone has an elegant solution.
    I have a rather large data set. (actually 5 of them on a
    single page) I am sorting certain columns in a table as numbers so
    i assign the variable " ds1.setColumnType("somenumbercolumn",
    "number")" In most cases Spry works great and it sorts by numbers
    properly. The problem is some of the fields in the XML file are
    null and I am trying to sort them as a number. Spry actually
    adjusts for this (as far as i can tell) and treats them like a 0
    which isn't exactly ideal considering there are real zero values in
    the data. I know spry doesn't currently format numbers:
    So here is my question. Does anyone one have a solution to
    fixing null values in a table so that it is still sortable but
    doesn't display a "0" and instead displays something like "--" or
    whatever. I have the option of editing the XML file as well, but I
    still need the table to sort by number.
    If not null values, how about non numeric fields which can
    still be sorted in a numeric column?

    Hi,
    We have an old post that raised a similar problem with yours.
    The post can be found
    here
    For you situation, you should add an if condition for the
    rows that have 0 and to add a custom string instead 0.
    for (var i = 0; i < numRows; i++)
    if(rows
    [ "field_name"] == 0)
    rows[ "field_name" ] = '--';
    Hope this helps you,
    Diana

Maybe you are looking for