Select_list_from_query function null value

How does one remove the null value when using the select_list_query function?
So if I have the following:
SELECT HTMLDB_ITEM.SELECT_LIST_FROM_QUERY(3,id,'SELECT id FROM emp')
FROM emp
It currently adds the extra null '%' value.
Where would I plug in the p_show_null value in the function or is this not possible?

Thanks for the help. I found out it was the positioning of the NO parameter value.
If I simply added one 'NO' after the query, it would not recognize it but when I added 2 'NO' 's as displayed below then it removed the null value.
SELECT HTMLDB_ITEM.SELECT_LIST_FROM_QUERY(3,id,'SELECT id FROM emp', 'NO', 'NO')
FROM emp
Thanks again.

Similar Messages

  • Need help on Null value check function

    Hey guys,
    I need to create a function that will accept two values and perform a comparison on them and based on whether or not they're different, return true or false.
    Initially I had no idea about the problems of comparing when a value was null, hence the need for a function, as I need to compare many fields of rows of a table in order to find what has changed.
    Now, I think I have the NULL check logic in place :
    IF R1.X IS NULL THEN
         IF R2.X IS NULL THEN
              RETURN FALSE; -- both R1 and R2 are null so no diffs
         ELSE
              RETURN TRUE; -- R1 is null but R2 is not, so it's a diff
         END IF;
    ELSE
         IF R2.X IS NULL THEN
              RETURN TRUE; -- R1 is not null but R2 is so a diff
         ELSE
              IF R1.X != R2.X THEN
                   RETURN TRUE; -- both not null but different
              ELSE
                   RETURN FALSE; -- both not null but equal
              END IF;
         END IF;
    END IF;My problem is that I don't know how, or if i can, create function that can simply accept two column values without defining their datatypes in the function sig. Reason being that while I will always be comparing like-for-like datatypes, I won't always be comparing the "same" like-for-like datatypes; so as I loop through 100 table rows (differentiated by a date), I'll physically compare all the fields in the rows one by one, and in one instance i'm comapring two NUMBERs and then two VARCHARs and then two DATEs, etc.
    What i didn't want was duplicate func's that are all the same apart from the sig's.
    Is there an easy(ier) way to accomplish this? Is there a more "generic" value type I could use? basically i just want to have a function like :
    CREATE OR REPLACE FUNCTION(val1 VALUE, val2 VALUE)
    And not multiple like :
    CREATE OR REPLACE FUNCTION(val1 NUMBER, val2 NUMBER)
    CREATE OR REPLACE FUNCTION(val1 DATE, val2 DATE)
    and so on.
    Edited by: user11258962 on 28-Jun-2010 09:02

    You can use function overloading. So, although three function will exist, they will all be called the same name, so your code will always call a single function
    create or replace package pkg_compare as
      function is_Alike (p1 in number
                        ,p2 in number) return boolean ; 
      function is_Alike (p1 in varchar2
                        ,p2 in varchar2) return boolean; 
      function is_Alike (p1 in date
                        ,p2 in date) return boolean; 
    end pkg_Compare;
    create or replace package body pkg_compare as
      function is_Alike (p1 in number
                        ,p2 in number) return boolean as
        begin
          return ( nvl(p1,0) = nvl(p2,-1) );
      end is_Alike;
      function is_Alike (p1 in varchar2
                        ,p2 in varchar2) return boolean as
        begin
          return ( nvl(p1,'X') = nvl(p2,'Z') );
      end is_Alike;
      function is_Alike (p1 in date
                        ,p2 in date) return boolean as
        begin
          return ( nvl(p1,sysdate) = nvl(p2,sysdate-1) );
      end is_Alike;
    end pkg_Compare;
    /

  • Ago Function gives NULL values

    Friends,
    I need help regarding Ago function available at column level in BMM.
    I am not at all receiving any error. Unfortunately after Ago function implementation i am getting NULL values for that particular column.
    Here are my implementation steps for getting "Month Ago" values for "Amout column" in Sales table.
    1. i have created Time dimension hieararchy.
    It is like this - Year - > Quarter - > Month - > Actual Date
    2. Defining Keys and making them chronological are also done.
    3. Actual Date is the PK and joins with my Fact.
    4. "Amount" Column in Fact is set to 'Sum'.
    5. i created a new column named " Amount Month Ago" and set following logic to its expression builder.
    Ago("AR Reserve"."Fact - AR Reserve Calc Dtl"."Amount" ,  "AR Reserve"."Dim - TimeDim"."Month" , 1)
    I have not received any error.
    Once i pull this new column (Amont Month Ago) into the presentation layer and try to create a Tabular report. It is not showing any value. Other column values are OK as expected.
    I know i am missing something important here.
    Requesting you all to guide me. I am working on OBIEE 10g.

    Hi,
    Hitting a 'NULL' value in the report hints me of some issues with the Hierarchy/Content setup of the LTS. I suggest you to enable level 7 log and see if the AGO(<measure>) is being nullified by the BI Server due to incompatible facts.
    If it is, then you got to revisit your Period hierarchy and content settings in the Fact LTS. Some generic suggestions are,
    1. Create hierarchies for all dimensions available.
    2. Set the granularity of the sources in the fact to all available hierarchies.
    Hope this helps.
    Thank you,
    Dhar

  • LAG & LEAD functions... Any Way to Retrieve the 1st non-NULL Values?

    My question is this... Has anyone found an elegant way of getting the LAG & LEAD functions to move to the 1st NON-NULL value within the partition, rather than simply using a hard-coded offset value?
    Here's some test data...
    IF OBJECT_ID('tempdb..#temp') IS NOT NULL DROP TABLE #temp
    CREATE TABLE #temp (
    BranchID INT NOT NULL,
    RandomValue INT NULL,
    TransactionDate DATETIME
    PRIMARY KEY (BranchID, TransactionDate)
    INSERT #temp (BranchID,RandomValue,TransactionDate) VALUES
    (339,6, '20060111 00:55:55'),
    (339,NULL, '20070926 23:32:00'),
    (339,NULL, '20101222 10:51:35'),
    (339,NULL, '20101222 10:51:37'),
    (339,1, '20101222 10:52:00'),
    (339,1, '20120816 12:02:00'),
    (339,1, '20121010 10:36:00'),
    (339,NULL, '20121023 10:47:53'),
    (339,NULL, '20121023 10:48:08'),
    (339,1, '20121023 10:49:00'),
    (350,1, '20060111 00:55:55'),
    (350,NULL, '20070926 23:31:06'),
    (350,NULL, '20080401 16:34:54'),
    (350,NULL, '20080528 15:06:39'),
    (350,NULL, '20100419 11:05:49'),
    (350,NULL, '20120315 08:51:00'),
    (350,NULL, '20120720 11:48:35'),
    (350,1, '20120720 14:48:00'),
    (350,NULL, '20121207 08:10:14')
    What I'm trying to accomplish... In this instance, I'm trying to populate the NULL values with the 1st non-null preceding value. 
    The LAG function works well when there's only a single null value in a sequence but doesn't do the job if there's more than a singe NULL in the sequence.
    For example ...
    SELECT
    t.BranchID,
    t.RandomValue,
    t.TransactionDate,
    COALESCE(t.RandomValue, LAG(t.RandomValue, 1) OVER (PARTITION BY t.BranchID ORDER BY t.TransactionDate)) AS LagValue
    FROM
    #temp t
    Please note that I am aware of several methods of accomplishing this particular task, including self joins, CTEs and smearing with variables.
    So, I'm not looking for alternative way of accomplishing the task... I'm wanting to know if it's possible to do this with the LAG function.
    Thanks in advance,
    Jason
    Jason Long

    I just wanted to provide a little follow-up now that I had a little time to check up and digest Itzik’s article and tested the code posed by Jingyang.
    Turns out the code posted by Jingyang didn’t actually produce the desired results but it did get me pointed in the right direction (partially my fault for crappy test data that didn’t lend itself to easy verification). That said, I did want to post the version
    of the code that does produce the correct results.
    IF OBJECT_ID('tempdb..#temp') IS NOT NULL DROP TABLE #temp
    CREATE TABLE #temp (
    BranchID INT NOT NULL,
    RandomValue INT NULL,
    TransactionDate DATETIME
    PRIMARY KEY (BranchID, TransactionDate)
    INSERT #temp (BranchID,RandomValue,TransactionDate) VALUES
    (339,6, '20060111 00:55:55'), (339,NULL, '20070926 23:32:00'), (339,NULL, '20101222 10:51:35'), (339,5, '20101222 10:51:37'),
    (339,2, '20101222 10:52:00'), (339,2, '20120816 12:02:00'), (339,2, '20121010 10:36:00'), (339,NULL, '20121023 10:47:53'),
    (339,NULL, '20121023 10:48:08'), (339,1, '20121023 10:49:00'), (350,3, '20060111 00:55:55'), (350,NULL, '20070926 23:31:06'),
    (350,NULL, '20080401 16:34:54'), (350,NULL, '20080528 15:06:39'), (350,NULL, '20100419 11:05:49'), (350,NULL, '20120315 08:51:00'),
    (350,NULL, '20120720 11:48:35'), (350,4, '20120720 14:48:00'), (350,2, '20121207 08:10:14')
    SELECT
    t.BranchID,
    t.RandomValue,
    t.TransactionDate,
    COALESCE(t.RandomValue,
    CAST(
    SUBSTRING(
    MAX(CAST(t.TransactionDate AS BINARY(4)) + CAST(t.RandomValue AS BINARY(4))) OVER (PARTITION BY t.BranchID ORDER BY t.TransactionDate ROWS UNBOUNDED PRECEDING)
    ,5,4)
    AS INT)
    ) AS RandomValueNew
    FROM
    #temp AS t
    In reality, this isn’t exactly a true answer to the original question regarding the LAG & LEAD functions, being that it uses the MAX function instead, but who cares? It still uses a windowed function to solve the problem with a single pass at the data.
    I also did a little additional testing to see if casting to BINARY(4) worked across the board with a variety of data types or if the number needed to be adjusted based the data… Here’s one of my test scripts…
    IF OBJECT_ID('tempdb..#temp') IS NOT NULL DROP TABLE #temp
    CREATE TABLE #Temp (
    ID INT,
    Num BIGINT,
    String VARCHAR(25),
    [Date] DATETIME,
    Series INT
    INSERT #temp (ID,Num,String,Date,Series) VALUES
    (1, 2, 'X', '19000101', 1), ( 2, 3, 'XX', '19000108', 1),
    (3, 4, 'XXX', '19000115', 1), ( 4, 6, 'XXXX', '19000122', 1),
    (5, 9, 'XXXXX', '19000129', 1), ( 6, 13, 'XXXXXX', '19000205', 2),
    (7, NULL, 'XXXXXXX', '19000212', 2),
    (8, NULL, 'XXXXXXXX', '19000219', 2),
    (9, NULL, 'XXXXXXXXX', '19000226', 2),
    (10, NULL, 'XXXXXXXXXX', '19000305', 2),
    (11, NULL, NULL, '19000312', 3), ( 12, 141, NULL, '19000319', 3),
    (13, 211, NULL, '19000326', 3), ( 14, 316, NULL, '19000402', 3),
    (15, 474, 'XXXXXXXXXXXXXXX', '19000409', 3),
    (16, 711, 'XXXXXXXXXXXXXXXX', '19000416', 4),
    (17, NULL, NULL, '19000423', 4), ( 18, NULL, NULL, '19000430', 4),
    (19, NULL, 'XXXXXXXXXXXXXXXXXXXX', '19000507', 4), ( 20, NULL, NULL, '19000514', 4),
    (21, 5395, NULL, '19000521', 5),
    (22, NULL, NULL, '19000528', 5),
    (23, 12138, 'XXXXXXXXXXXXXXXXXXXXXXX', '19000604', 5),
    (24, 2147483647, 'XXXXXXXXXXXXXXXXXXXXXXXX', '19000611', 5),
    (25, NULL, 'XXXXXXXXXXXXXXXXXXXXXXXXX', '19000618', 5),
    (26, 27310, 'XXXXXXXXXXXXXXXXXXXXXXXXX', '19000618', 6),
    (27, 9223372036854775807, 'XXXXXXXXXXXXXXXXXXXXXXXXX', '19000618', 6),
    (28, NULL, NULL, '19000618', 6),
    (29, NULL, 'XXXXXXXXXXXXXXXXXXXXXXXXX', '19000618', 6),
    (30, 27310, NULL, '19000618', 6)
    SELECT
    ID,
    Num,
    String,
    [Date],
    Series,
    CAST(SUBSTRING(MAX(CAST(t.[Date] AS BINARY(4)) + CAST(t.Num AS BINARY(4))) OVER (ORDER BY t.[Date] ROWS UNBOUNDED PRECEDING), 5,4) AS BIGINT) AS NumFill,
    CAST(SUBSTRING(MAX(CAST(t.[Date] AS BINARY(4)) + CAST(t.Num AS BINARY(4))) OVER (PARTITION BY t.Series ORDER BY t.[Date] ROWS UNBOUNDED PRECEDING), 5,4) AS BIGINT) AS NumFillWithPartition,
    CAST(SUBSTRING(MAX(CAST(t.[Date] AS BINARY(4)) + CAST(t.Num AS BINARY(8))) OVER (ORDER BY t.[Date] ROWS UNBOUNDED PRECEDING), 5,8) AS BIGINT) AS BigNumFill,
    CAST(SUBSTRING(MAX(CAST(t.[Date] AS BINARY(4)) + CAST(t.Num AS BINARY(8))) OVER (PARTITION BY t.Series ORDER BY t.[Date] ROWS UNBOUNDED PRECEDING), 5,8) AS BIGINT) AS BIGNumFillWithPartition,
    CAST(SUBSTRING(MAX(CAST(t.ID AS BINARY(4)) + CAST(t.String AS BINARY(255))) OVER (ORDER BY t.ID ROWS UNBOUNDED PRECEDING), 5,255) AS VARCHAR(25)) AS StringFill,
    CAST(SUBSTRING(MAX(CAST(t.ID AS BINARY(4)) + CAST(t.String AS BINARY(25))) OVER (PARTITION BY t.Series ORDER BY t.ID ROWS UNBOUNDED PRECEDING), 5,25) AS VARCHAR(25)) AS StringFillWithPartition
    FROM #Temp AS t
    Looks like BINARY(4) is just fine for any INT or DATE/DATETIME values. Bumping it up to 8 was need to capture the largest BIGINT value. For text strings, the number simply needs to be set to the column size. I tested up to 255 characters without a problem.
    It’s not included here, but I did notice that the NUMERIC data type doesn’t work at all. From what I can tell, SS doesn't like casting the binary value back to NUMERIC (I didn't test DECIMAL).
    Thanks again,
    Jason
    Jason Long

  • Will substr + not function ignore null values ?

    hi guys
    i have a table test with 1 column named (value) of varchar2 type.
    inside this table, i have 3 rows.
    1) 2255
    2) null
    3) 5522
    when i do select * from test where substr(value,1,1) not in ('3'), it only returns me
    row 1) 2255
    row 3) 5522
    but why doesnt it return me row 2 with null value as well ?
    since substr(null) will generate null. and null is also NOT IN ('3'), why doesnt it shows?
    any ideas guys ?

    Because NULL is unknown.
    By definition you cannot say if unknown is IN or NOT IN anything.
    So you have to account for the unknown however you think appropriate, in your case that would mean saying:
    select * from test where substr(value,1,1) not in ('3') OR value IS NULL;
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • APEX_ITEM.SELECT_LIST_FROM_QUERY Function

    Quotation from online documentation:
    The following example demonstrates a select list based on a SQL query.
    SELECT APEX_ITEM.SELECT_LIST_FROM_QUERY(3,job,'SELECT DISTINCT job FROM emp') FROM emp
    1) it can not compile at all ...
    2) inner select does not make sense because as is described few lines above ... it has to return pairs (value,key)
    3) I have lost half an hour and this function always returned null...
    Have anybody used it at all?
    Can you please post some working example?

    Hi,
    It worked for me but after I made some changes like this:
    SELECT APEX_ITEM.SELECT_LIST_FROM_QUERY
    (3, job_code,'SELECT DISTINCT job_name, job_code FROM emp') FROM emp.
    ApEx help for this function has the following:
    SQL query that is expected to select two columns, a display column, and a return column.
    For example:
    SELECT dname, deptno FROM dept
    Note that this is used only by the SELECT_LIST_FROM_QUERY function."
    Val

  • 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();">

  • 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 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 value for int and datetime date type in xml schema

    hi:
    I am embarrassed by a qustion in xml schema; i defined a xml schema file like
    this:
    <elementFormDefault="qualified" attributeFormDefault="qualified">
    <xs:element name="test">
    <xs:annotation>
    <xs:documentation>Comment describing your root element</xs:documentation>
    </xs:annotation>
    <xs:complexType>
    <xs:sequence>
    <xs:element name="name" type="xs:string"/>
    <xs:element name="password" type="xs:string" nillable="true"/>
    <xs:element name="user" type="xs:int" nillable="true"/>
    <xs:element name="s_time" type="xs:dateTime"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    and I send this file to workflow clientrequest() node, I wanted to receive data
    in this schema file.but when i send null value to the element "user" and "s_time"
    in workshop test tool(test soap),and use function in xmlbean like isNilUser or
    isNilStime, one error occur.
    I don't kown why, I had to ask the engineer of bea in china, one told me a bug.
    is that true?

    Visakh16 I cant agree more with you on it, it is good but in production u cant have them change maxrows. I think
    Patrick  Hurst is a better option. debug the package have it running and move up
    Please mark as helpful and propose as answer if you find this as correct!!! Thanks,Dia Agha .
    Hmm..Why do you need to change it in production?
    What I suggested was to tweak the setting in dev machine so that it interprets the Excel file datatypes correctly when doing development. Once mapping is set correctly then it will work fine when in production or in any other environment. The tweaking is
    just to make sure it interprets the datatype correctly at design time and has nothing to do with production deployment 
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • [OBIEE-11g] Error getting Nqid always null value

    Hi to all, I've a problem to load Nqid in a dashboard on 11g OBIEE.
    The javascript function return always a null value and the document.cookie instruction return an empty string ...
    somebody could help me ?!
    p.s.: in the firefox properties there is a cookie that contain the id but i can't read it
    function getNqid() {
    var nameEQ = 'nQuireID=';
    var ca = document.cookie.split(';');
    for(var i=0; i<ca.length; i++) {
    var c = ca;
    while (c.charAt(0)==' ')
    c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0)
    return c.substring(nameEQ.length,c.length);
    return null;

    Hi,
    You might want to check the NQQuery.log to see the code that it is running before making a connection. Just to confirm that the connection pool step is working fine, could you try with a simple select statement and see that it does not error out. If it does not, you may want to revisit the procedure code again. I understand from the error that it is expecting something after the END statement (kind of weird though!!). I assume in this case, it could not parse that this is a stored procedure call itself may be. One thread I found is http://stackoverflow.com/questions/4270818/ora-06550-and-pls-00103 which you may want to look for the line break characters.
    Hope this helps.
    Thank you,
    Dhar

  • How to eliminate explicit "null" values

    Hello,
    I am having a problem in eliminating the explicit "null" values while retrieving them from the database.
    Here is my problem as follows,
    For the optional fields in a form i am explicitly entering "null" as value or else it is throwing null pointer exception in linux. While i am trying to display the values existing in a table it is displaying fine when i use this condition
    if(varialble.equals("null") ||varialble.equals("") || variable.equals(null))
    varialble = "";
    else
    out.println(variable)
    But when i use the same for the values i retrieve from the view it is displaying "Null" for the explicit "null" values and null from implicit null values.
    Please help me out how to remove the explicit null values. It would be great help if somebody replies me at the earliest.
    Thanks in advance
    daya

    the following is the code which i am using to retrieve values.
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.io.*;
    import StrChk.*;
    public class DataSearch extends HttpServlet
         Connection con=null;
         Statement st=null;
         ResultSet rs=null;
         ResultSetMetaData rsmd=null;
         PrintWriter out=null;
         public void doPost(HttpServletRequest req, HttpServletResponse res)
         throws IOException,ServletException
              String key;
              String sql;
              res.setContentType("text/html");
              out = res.getWriter();
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection("jdbc:odbc:daya","daya","daya");
                   st = con.createStatement();
              catch(Exception e)
                   System.out.println("Error Accessing DataBase:"+e);
              key = req.getParameter("key");
    //          Search(str1.retString(key));
              Search(key);
         public void Search(String key)
              int res=0;
              boolean flag=true,found=false;
              StringTokenizer strt = new StringTokenizer(key, " ");
              String sql;
              String str1,str2;
              int i=0;
    int count = strt.countTokens();
    String keywords[] = new String[count+1];
              keywords=key;
              i++;
              if(count > 1)
         count++;
                   while(strt.hasMoreTokens())
                   keywords[i] = strt.nextToken();
                        i++;
              out.println("<html><title>DataSearch</title>");
              out.println("<script>");
              out.println("function myclose(){ self.close(); } ");
              out.println("</script><body>");
              for(i=0; i<count && flag==true; i++)
                   try
              /* sql = "select ";
                   sql += " nvl(\"Topic Title\",' '), ";
                   sql += " nvl(\"Name\",' '), ";
                   sql += " nvl(\"Title\",' '), ";
                   sql += " nvl(\"Affiliation\",' '), ";
                   sql += " nvl(\"Street Name\",' '), ";
                   sql += " nvl(\"City\",' '), ";
                   sql += " nvl(\"State\",' '), ";
                   sql += " nvl(\"Country\",' '), ";
                   sql += " nvl(\"Zip Code\",' '), ";
                   sql += " nvl(\"Phone\",' '), ";
                   sql += " nvl(\"Fax\",' '), ";
                   sql += " nvl(\"eMail\",' '), ";
                   sql += " nvl(\"Web Site\",' ') ";
                   sql += " from SEARCHVWUSERDET where ";
                   sql += " lower(\"Name\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"Title\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"Affiliation\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"Street Name\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"City\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"State\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"Country\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"eMail\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"Web Site\") like " + "lower('%" + keywords[i] + "%')";*/
                   sql = "select ";
                   sql += " nvl(\"Name\",' '), ";
                   sql += " nvl(\"Title\",' '), ";
                   sql += " nvl(\"Affiliation\",' '), ";
                   sql += " nvl(\"Street Name\",' '), ";
                   sql += " nvl(\"City\",' '), ";
                   sql += " nvl(\"State\",' '), ";
                   sql += " nvl(\"Country\",' '), ";
                   sql += " nvl(\"Zip Code\",' '), ";
                   sql += " nvl(\"Phone\",' '), ";
                   sql += " nvl(\"Fax\",' '), ";
                   sql += " nvl(\"eMail\",' '), ";
                   sql += " nvl(\"Web Site\",' '), ";
                   sql += " nvl(\"Key Words\",' ') ";
                   sql += " from searchcombi where ";
                   sql += " lower(\"Name\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"Title\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"Affiliation\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"Street Name\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"City\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"State\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"Country\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"eMail\") like " + "lower('%" + keywords[i] + "%') or ";
                   sql += " lower(\"Web Site\") like " + "lower('%" + keywords[i] + "%') or";
                   sql += " lower(\"Key Words\") like " + "lower('%" + keywords[i] + "%')";
                   sql += " order by \"Name\" ";
                   rs = st.executeQuery(sql);
                   //out.println(sql);
                   if(rs.next())
                        if(i == 0)
                             flag=false;
                        found=true;
                        res=0;
                   do
                        res++;
                   }while(rs.next());
                   out.println(res++);
                   out.println("<center><font color=#ff9999 face=\"verdana, geneva, arial, sans-serif\" size=2><b>Searched for \""+ keywords[i]+"\", ");
                   out.println("Total Matches found : "+res+"</center><br>");
                   rs = st.executeQuery(sql);
                   while(rs.next())
                        res++;
                             out.println("<table width=600 align=center>");
                             str1 = disp(rs.getString(1),keywords[i]);
                             out.println(str1);
                             //if(str1.equals("null") || str1.equals(" ") || str1.equals(null))
                             if(str1 == "null" || str1 == "")
                                  str1 = "";
                             else
                                  out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Name </td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>"+str1+"</td></tr>");
                                  //System.out.println(str1);
                                  //out.println(str1);
                             str2="";
                             str1 = disp(rs.getString(2),keywords[i]);
                             if(!str1.equals("") || !str1.equals(""))
                                  str2 = str1;          
                             str1 = disp(rs.getString(3),keywords[i]);
                             if(!str1.equals(" ") || !str1.equals(""))
                                  if(str2.length() > 0 || !str2.endsWith(", "))
                                       str2+= ", ";
                                  str2 += str1;
                             if(!str2.equals(""))
                                  out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Title, Affiliation</td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>");
                                  out.println(str2);     
                                  out.println("</td></tr>");
                             str2="";
                             str1 = disp(rs.getString(4),keywords[i]);
                             if(!str1.equals(" ") || !str1.equals(""))
                                  str2 = str1;          
                             str1 = disp(rs.getString(5),keywords[i]);
                             if(!str1.equals(" ") || !str1.equals(""))
                                  if(str2.length() > 0 || !str2.endsWith(", "))
                                       str2+= ", ";
                                  str2 += str1;
                             str1 = disp(rs.getString(6),keywords[i]);
                             if(!str1.equals(" ") || !str1.equals(""))
                                  if(str2.length() > 0 || !str2.endsWith(", "))
                                       str2+= ", ";
                                  str2 += str1;
                             str1 = disp(rs.getString(7),keywords[i]);
                             if(!str1.equals(" ") || !str1.equals(""))
                                  if(str2.length() > 0 || !str2.endsWith(", "))
                                       str2+= ", ";
                                  str2 += str1;
                             str1 = disp(rs.getString(8),keywords[i]);
                             if(!str1.equals(" ") || !str1.equals(""))
                                  if(str2.length() > 0 || !str2.endsWith(", "))
                                       str2+= ", ";
                                  str2 += str1;
                             if(!str2.equals(""))
                                  out.println("<tr><td valign=top width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Address </td>");
                                  out.println("<td><font face=\"verdana, geneva, arial, sans-serif\" size=2>");
                                  out.println(str2);     
                                  out.println("</td></tr>");
                             str1 = disp(rs.getString(9),keywords[i]);
                             if(!str1.equals(" ") || !str1.equals(""))
                                  out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Phone</td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>"+str1+"</td></tr>");
                             str1 = disp(rs.getString(10),keywords[i]);
                             if(!str1.equals(" ") || !str1.equals(""))
                                  out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Fax</td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>"+str1+"</td></tr>");      
                             str1 = disp(rs.getString(11),keywords[i]).toLowerCase();
                             if(!str1.equals(" ") || !str1.equals(""))
                                  out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>eMail</td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>"+str1+"</td></tr>");
                             str1 = disp(rs.getString(12),keywords[i]).toLowerCase();
                             if(str1.equals("null") || str1.equals(" ") || str1.equals(null))
                                  str1="";
                             else
                                  out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Web Site</td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>"+str1+"</td></tr>");
                             str1 = disp((rs.getString(13)).replace(',',' '),keywords[i]);
                             if(str1 == "null" || str1 == null || str1 == "")
                             //if(!rs.wasNull())
                                  out.println("nothing");
                             else
                                  out.println("<tr><td width=150><font color = green face=\"verdana, geneva, arial, sans-serif\" size=2><b>Key Words</td><td><font face=\"verdana, geneva, arial, sans-serif\" size=2>"+str1+"</td></tr>");
                             out.println("<tr><td width=150><hr></td><td><hr></td></tr>");
                             out.println("</table><br>");
                   } // end while
                   } // end if
                   catch(Exception e)
                        System.out.println("Exception while executing query: "+ e);
              } // end for
              if(!found)
                   out.println("<center><font color=#ff9999 face=\"verdana, geneva, arial, sans-serif\" size=2><b>Searched for \""+ key+"\", ");
                   out.println("Total Matches found : 0</center><br>");
              out.println("<center><a href=\"javascript:myclose()\"><font color=red face=\"verdana, geneva, arial, sans-serif\" size=2>Close</a></center>");
              out.println("</body></html>");
         public void doGet(HttpServletRequest req, HttpServletResponse res)
         throws IOException,ServletException
              doPost(req,res);
         public String disp(String str1, String str2)
              int i,j,k;
              boolean found=false;
              String s1,s2,s3;
              String t1,t2;
              t1 = initCap(str1);
              s1 = t1.toLowerCase();
              s2 = str2.toLowerCase();
              for(i=0;i<s1.length() && !found ;i++)
                   k=i;
                   for(j=0;j<s2.length() && k < s1.length() && s1.charAt(k) == s2.charAt(j) ;j++,k++);
                   if(j==s2.length())
                        found=true;
              if(found)
                   i--;
                   s3 = t1.substring(0,i);
                   s3 += "<font color=blue face=\"verdana, geneva, arial, sans-serif\" size=2><b>";
                   s3 += t1.substring(i,i+str2.length());
                   s3 += "</font></b>";
                   s3 += t1.substring(i+str2.length(),t1.length());
              else
                   s3 = t1;
              return s3;
         public String initCap(String str)
              StringTokenizer st = new StringTokenizer(str," ");
              String s1="";
              String s2="";
              String s3="";
              String s4="";
              while(st.hasMoreElements())
                   s1 = (String)st.nextElement();
                   if(s1.length() > 0)
                        s2 = s1.substring(0,1);
                        s2 = s2.toUpperCase();
                   if(s1.length() > 1)
                        s3 = s1.substring(1,s1.length());
                   s2 += s3;
                   s4 +=" "+s2;
              return s4;

  • Null Value in PI 7.1

    Hi
    I am working on Proxy to SOAP Scenario, I receive null value at the first instance when I display the Queue, and values after the null,  and the values are coming from the different nodes, and mapping needs to be done at the different level too.
    Example I receive the state vale as
    1. null
    2.CA
    3.NV
    in order to avoid the null value while mapping what is the function to use it, I used Remove context but still I receive the null value at the begining
    Thanks
    PR

    Hi PR,
    In my case, because of this change in 7.1 a mapping which is working in 7.0 was resulting in wrong results in 7.1
    I doubt this change was done by SAP in 7.1 for ease of use in UDF.
    However, in your scenario try placing a remove contexts-split by value immediately after the condition it suppress the null.
    Else provide me your condition in MM I will replicate and help you.
    Also, try changing the context to a higher level
    Venkat.
    Edited by: Venkat Anusuri on Aug 5, 2009 3:43 PM

  • Null Value in List of Values

    Hi,
    I have done a search on the threads with null value in LOVs but it has not helped me understand the situation any better.
    currently i have two select lists on a form, customer and project.
    customers have many projects - and the only mandatory field on this form is customer - a project does NOT have to be selected - however, when the project is selected - i wish to validate the two items so that the selected project belongs to the selected customer.
    i have been able to do this to some degree using the validation by doing a select exists, however, when the project select list has no item set (is NULL) then the validation function fails.
    the validation function works fine when the project is not null. i basically want to force to to turn the %null% into actual null so i can use the is null function or something along those lines.
    i have tried writing a calculation that does the actual translaction after submit, however, i think i'm writing the code wrong
    can anyone lend a hand? or suggest some other alternatives?
    Many thanks!

    Hi Scott,
    Thanks for your reply
    I have tried to enter the item level validation as an exists query as follows :-
    select project_name from project where (:p2_project_id = '%null'||'%') OR (project_id = :p2_project_id AND customer_id = :p2_customer_id)
    :p2_project_id and :p2_customer_id are both select lists.
    it checks to see whether the :p2_project_id is null if it is, then no checking is necessary - otherwise, the project selected must have the correct customer selected.
    i can check that the project has a matching customer selected when project is not null, but when it is null i get the problem
    select project_name from project where (:p2_project_id = '%null'||'%') OR (project_id = :p2_project_id AND customer_id = :p2_customer_id): ORA-01722: invalid number
    any ideas?
    cheers
    leonard

Maybe you are looking for

  • Aggregation issue Bex report

    Hi all, I am facing the following aggregation issue at reporing level. BW system 3.5 Cube1 Material, Company code, Cost center, Material, Month,   Volume KF Cube2 Material, Company code, Cost center, Material, Month,   Price KF Multi provider Materia

  • MSI K7N2 DELTA -L (601-6570-020) nFORCE 2 DUAL 400 , RANDOM RESTART PROBLEM (WinXP,Win98)

    Machine Specs: - AMD Athlon XP 2600+ With L2 512 KB (Model 10) - MSI K7N2 Delta -L nFORCE 2 Ultra 400 (601-670-020) (My AwardBios is updated to v5.7, Using nVIDIA`s O/B Audio and Ethernet Controllers) - TwinMOS PC3200(CL2.5) 512 MB DDR400 RAM (Deskto

  • Cannot create a session of an IVI using IIviSessio​nFactory in VB6

    With a valid configuration within MAX 3.0.2, using the following code produces a run-time error... Dim Factory As New IviSessionFactory Dim Dmm As IIviDmm Set Dmm = Factory.CreateDriver("HpDmm") Dmm.Initialize "HpDmm", True, True The above code snipp

  • Using sample CSS in web dynpro aplication

    Hi experts, Is there any possibility of applying a standard sample CSS file I have to my webdynpro java application without making use of NWDS Theme editor or portal themes. Thanks!!! Lisha

  • Do I have to share each calendar individually?

    I use to be able to published all my calendars with one link. Now "groups" are not supported. With the recent iCal4 upgrade, it seems I have to broadcast ALL my calendars individually. Can I publish my entire calendar (ie, "work", "home", "kids", "pr