Null values in model function

Hello,
Here is the table I m using :
CREATE TABLE "TEST"
  "IDENTIFIANTACTIONNAIRE" NUMBER(23,0),
  "NUMEROECRITURE" NUMBER(8,0),
  "SENSOPERATION" VARCHAR2(1 BYTE),
  "NOMBRETITRES" NUMBER(15,0),
  "INDICATEURPMU" VARCHAR2(3 BYTE),
  "SOLDE" NUMBER(15,0));
I have made these insetions :
insert into test values (10,1111,'I',5,'Yes',NULL);
  insert into test values (10,2222,'I',2,'Yes',NULL);
   insert into test values (10,3333,'R',-7,'Yes',NULL);
    insert into test values (10,4444,'R',-5,'Yes',NULL);
     insert into test values (10,5555,'I',5,'Yes',NULL);
      insert into test values (10,6666,'I',0,'Yes',NULL);
       insert into test values (10,7777,'I',0,'Yes',NULL);
        insert into test values (10,8888,'I',0,'Yes',NULL);
I m trying to have the Solde comlumn return the cumulation of the the column 'NombreTitres'. The disired result of the sold column is this in order :
5,7,0,0,5,0,0,0
Here is the SQL I m using but giving me null all the time :
SELECT
  IDENTIFIANTACTIONNAIRE,
  NUMEROECRITURE,
  SENSOPERATION,
  NOMBRETITRES,
  INDICATEURPMU,
  Solde
  FROM test
  where identifiantactionnaire = 10
MODEL PARTITION BY (IDENTIFIANTACTIONNAIRE,INDICATEURPMU)
       DIMENSION BY (row_number() OVER (PARTITION BY IDENTIFIANTACTIONNAIRE,INDICATEURPMU ORDER BY NUMEROECRITURE) rid)
       MEASURES(
                NUMEROECRITURE,
                SENSOPERATION,
                NOMBRETITRES,
                0 Solde
rules sequential ORDER
Solde[1] = nombreTitres[1],
Solde[any] ORDER BY NUMEROECRITURE = CASE
                                          WHEN SENSOPERATION[cv()] = 'R' and (nombreTitres[cv()]*(-1)) + Solde[cv()-1] <=0 then 0
                                          WHEN SENSOPERATION[cv()] = 'R' THEN (nombreTitres[cv()]*(-1)) + Solde[cv()-1]
                                                    ELSE nombreTitres[cv()] + Solde[cv()-1] END

with
test as
(select 10 identifiantactionnaire,1111 numeroecriture,'I' sensoperation,5 nombretitres,'Yes' indicateurpmu from dual union all
select 10,2222,'I',2,'Yes' from dual union all
select 10,3333,'R',-7,'Yes' from dual union all
select 10,4444,'R',-5,'Yes' from dual union all
select 10,5555,'I',5,'Yes' from dual union all
select 10,6666,'I',0,'Yes' from dual union all
select 10,7777,'I',0,'Yes' from dual union all
select 10,8888,'I',0,'Yes' from dual
select identifiantactionnaire,numeroecriture,sensoperation,nombretitres,indicateurpmu,solde
  from test
where identifiantactionnaire = 10
model partition by (identifiantactionnaire,indicateurpmu)
       dimension by (row_number() over (partition by identifiantactionnaire,indicateurpmu order by numeroecriture) rid)
       measures(numeroecriture,sensoperation,nombretitres,0 solde)
rules
  solde[any] order by numeroecriture = case when nombretitres[cv()] = 0 /* TO PRODUCE THE FINAL THREE ZEROS */
                                            then 0                      /* INSTEAD OF THREE 5 WHEN MISSING  */
                                            when nvl(solde[cv()-1],0) + nombretitres[cv()] > 0
                                            then nvl(solde[cv()-1],0) + nombretitres[cv()]
                                            else 0
                                       end
IDENTIFIANTACTIONNAIRE
NUMEROECRITURE
SENSOPERATION
NOMBRETITRES
INDICATEURPMU
SOLDE
10
1111
I
5
Yes
5
10
2222
I
2
Yes
7
10
3333
R
-7
Yes
0
10
4444
R
-5
Yes
0
10
5555
I
5
Yes
5
10
6666
I
0
Yes
0
10
7777
I
0
Yes
0
10
8888
I
0
Yes
0
Regards
Etbin

Similar Messages

  • Wants to eliminate null values from mapping queue

    Hi All,
    How can I eliminate null values from 'display queue' of a target mapping.
    Can it be done through a UDF? Kindly help.
    Because of null value, it is creating issue in the mapping logic.
    Thanks,
    John

    We can remove null values using node functions.
    Check the below thread:
    Re: How to remove [] form Message Mapping Display Queue
    Or
    Try with the below UDF:
    for (int i=0; i<a.length;i++)
    if (! a<i>.equals(ResultList.SUPPRESS) || ! a<i>.equals(""))
    result.addValue(a<i>);
    Thanks,

  • CFFUNCTION reutrn null value

    How can I return a null value when the function return type
    is cfc

    Unfortunately ColdFusion does not have nulls. Even if you
    return nulls from the database it will make them into empty
    strings. If you return nulls from Java you will get variable is
    undefined errors.

  • How to define null or empty value in BAPI function modules?

    Hi,
    I have problem with BAPI functions, where some parameters are mandatory.
    For example: when I try to use HR BAPI's(BAPI_PERSDATA_CHANGE, etc.) I have to insert parameters like SUBTYPE,OBJECTID,LOCKINDICATOR. The PA0002 table that is used from this BAPI doesn't have SUBTYPE, OBJECTID, LOCKINDICATOR, for any of the records that I would like to select.
    So what I tried, was to put a ' ', to indicate that is empty. It returned an error message saying "Make an entry in all required fields". Next tried to put in some values for these fields -- and it returned an error message saying "No data selected from 0002 for this period".
    I also tried to run BAPI_FAMILY_CHANGE that uses data from table PA0021. Here I found some records with  SUBTYPE, OBJECTID fields that were not empty, but LOCKINDICATOR was still missing. So I tried to put LOCINDICATOR value directly in to database (with MS SQL Enterprise Manager).  After that I was able to use BAPI_FAMILY_CHANGE.
    I think that manually inserting data in database is not normal procedure.
    Is there something that I have missed out?
    I mean -- how can I get this to work without inserting data directly in database?
    How can I define null or empty value in BAPI function modules?
    Thank you in advance.
    Best regards,
    Mihail

    Defining an empty value for a parm in a table is easy.
    First get the function's definition from the SAP system
    Second only populate the fields for which you have a value to set
    Third execute the function.
    The JCO takes care of the rest.
    Enjoy

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

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

  • Howto map to an odata model function import returning an entity, not an entity set?

    Hi,
    how do I map to an odate model function import returning an entity (not an entity set) in a XML view? I tried property mapping {/method/property}, which does not make a network request and sets the value to null and I tried aggregation mapping {/method}, which makes a network request with $skip=0&$top=100&$inlinecount=allpages which is of course rejected by the odata source.
    Thanks,
    Wolfgang

    Hello Dr. Wolfgang,
    you can use
      var oParams = {};
      oParams.Field1 = 'ABC';
      oParams.Field2= 'XYZ';
      oParams.Field3= '123';
      oModel.callFunction('MyFuncImport', 'GET', oParams, null, function(oResponse){
            alert("Call to Func Imp successful");
        },function(){
            alert("Call to Func Imp failed");});
    also refer SAPUI5 SDK - Demo Kit
    Regards,
    Chandra

  • 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

Maybe you are looking for

  • Data guard monitoring shell script

    uname -a Linux DG1 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux SQL> select * from v$version; BANNER Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production PL/SQL Release 11.2.0.1.0 - Producti

  • Consolas font rendering issues

    Hi All, Consolas font is not getting rendered properly with Konsole on KDE & Openbox. LXTerminal on KDE is displaying the same behaviour. But it works well with LXterminal on Openbox 3.5.2. Any idea where the problem could be? http://aruncpp.blogspot

  • Which sRGB Profile to use (HP sRGB Profile, ICC BPC, ICCnoBPC, or no profile)?

    Hi everyone, May I ask something of you guys? I have a question that no one can seem to answer. I don't know which is the best profile to use--the HP sRGB Profile, the ICC sRGB BPC, the ICC sRGB with no BPC, or no profile (just colorspace tagged as s

  • Infospoke Issue

    Hi- We have an infospoke which is running successfully in production exporting 4 million records. For some reasons, it is not exporting any records in quality box...it runs successfully, but it exports 0 records. I checked the "RSBREQUID3RD" table to

  • Where can I find drivers for dvd device?

    Hi guys, Hi want to install Windows 7 but when I am running setup windows asks for drivers for dvd device. Where can I find these drivers or how can I install windows 7? I know hp does not support serie tx1000 in windows 7 but I have seen people who