need to sql where condition evaluates to null

Hello

I have a branch_master and I am from the following sql querry

Select * from branch_master where branch_code =: p3_branch_code

Here, if I give a null value for: p3_branch_code, querry must return all the branch_code and the details. Incase if I give a particular value as "acts".
It must then return only the rows where the branch_code has value "acts".

Otherwise, if the value of the condition is null then querry should ignore the condition itself. Any help is appreciated

your
Dr.s.Raghu

The easiest sollution is

select * from branch_master where branch_code = nvl(:p3_branch_code,branch_code)

but based on your index, you may need to do a SQL function returning a query and dynamically add the where the clause.
Kofi

Tags: Database

Similar Questions

  • How to add a where condition to seeds VO

    Hi I have a VO PoRequisitionLinesVO.Now knowledge I want to add the SQL where condition...

    How can I do this...? There is no addition of all fields... only adding a where condition clause?

    Will I need to extend that VO? If yes then how should I do this?

    Thank you...

    Yes, you must extend the VO.

    To get the procedure you can search the Internet, there is a great article (that I mentioned below):

    https://blogs.Oracle.com/prajkumar/entry/eo_based_vo_extension_in

    Kind regards

    Sandeep M.

  • Condition within a where condition clause

    Dear friends,
    I am a beginner in PL/SQL and I need your help.
    I'll show you my code (it does not):
    declare
        var_mese VARCHAR2 (2);
    begin
        select max(to_number(MESE)) 
        into var_mese
        from NOC_MONITORAGGIO;
           SELECT count(*)
            FROM noc_sdoc_work a,
                 noc_sdoc b,
                 NOC_MONITORAGGIO
           WHERE NVL(a.CD_STRUTTURA,'x') = NVL(b.CD_STRUTTURA,'x')
             AND NVL(a.CD_SUB_STRUTTURA,'x') = NVL(b.CD_SUB_STRUTTURA,'x')
             AND NVL(a.NR_PRATICA,'x') = NVL(b.NR_PRATICA,'x')
             AND NVL(a.ASL,'x') = NVL(b.ASL,'x')
             AND b.STATO IN ( 1, 2 )         
            and
                if  var_mese in ('03','04','05','06','07','08','09','10','11','12') then
                    NOC_MONITORAGGIO.ANNO_GESTIONE = b.ANNO;
                else
                    NOC_MONITORAGGIO.ANNO_GESTIONE = to_number(b.ANNO)-1;
                end if;
    end;
    My problem is here:
            and
                if  var_mese in ('03','04','05','06','07','08','09','10','11','12') then
                    NOC_MONITORAGGIO.ANNO_GESTIONE = b.ANNO;
                else
                    NOC_MONITORAGGIO.ANNO_GESTIONE = to_number(b.ANNO)-1;
                end if;
    I need a nested where condition

    Thank you
    Leo

    You can code box that using a statement in the WHERE clause:

     and NOC_MONITORAGGIO.ANNO_GESTIONE =
                case
                   when var_mese in ('03','04','05','06','07','08','09','10','11','12') then b.ANNO
                   else to_number(b.ANNO)-1
                end
    
  • WHERE condition in a sql statement

    Hello people,

    I have a screen with data grid where one of the columns is STATES_CODES and other VOLUMES one. Grid consists of several lines. I need to create a CUSTOM SEARCH field that will be filtering on this database.

    Unfortunately a customer wants to enter a search string with custom functions: '+' (plus) to include in the selection of the result and "-" (less) to exclude from the selection of the results. For example: "+ IT + -100". Based on this string, I need to return only the States HE and and exclude volumes with a value of 100.

    A tip how to build a query where condition, so it will be more effective as possible?

    Simple example:

    test data:

    with t (select 'IT' State, volume 90 of any union double

    Select 'IT' State, 100 volumes of all the double union

    Select 'IT' State, 100 volumes of all the double union

    Select 'OF' State, 90 volume of all the double union

    Select 'OF' State, in 100 volumes of all the double union

    Select 'OF' State, in 100 volumes of all the double union

    Select 'NL' State, 90 volume of all the double union

    Select 'NL' State, 100 volumes of all the double union

    Select 'NL' State, 100 volumes of all the double union

    Select 'FR' State, 90 volume of all the double union

    Select 'FR' State, in 100 volumes of all the double union

    Select 'FR' State, in 100 volumes of all the double union

    Select 'ARE' State, 90 volume of all the double union

    Select 'ARE' State, in 100 volumes of all the double union

    Select 'ARE' State, 100 volumes of double

    )

    Select * from t

    Search string: "+ IT + - 100".

    I thought to somehow using regular expressions REGEXP_LIKE condition, but do not know how to change the entered search string in above format as long as the regular expression.

    And if you want to be specific about the characters representing the State and the numbers represent the amount then you will need to divide them into more...

    SQL > with t (select 'IT' State, 90 volume of all the double union)
    2 Select 'IT' State, 100 volumes of all the double union
    3 select 'IT' State, 100 volumes of all the double union
    4. Select 'FROM' State, 90 volume of all the double union


    5. Select 'FROM' State, in 100 volumes of all the double union
    6. Select 'FROM' State, in 100 volumes of all the double union
    7 select 'NL' State, 90 volume of all the double union
    8 select 'NL' State, 100 volumes of all the double union
    9 select 'NL' State, 100 volumes of all the double union
    10. Select 'FR' State, 90 volume of all the double union
    11. Select 'FR' State, in 100 volumes of all the double union
    12. Select 'FR' State, in 100 volumes of all the double union
    13. Select 'ARE' State, 90 volume of all the double union
    14 select 'ARE' State, in 100 volumes of all the double union
    15 select 'ARE' State, in 100 volumes of double
    16              )
    17, ch. as (select "+ IT + -100"as the double criterion)
    18, split as (select regexp_substr (trim (', ' regexp_replace (criteria,'([+ -]) ', ', \1')), "[^,] +', 1, level") as a criterion of)
    19 c
    20 connect the regexp_substr (trim (', ' regexp_replace (criteria,'([+ -]) ', ', \1')), "[^,] +', 1, level") is not null
    21                 )
    22, inc_state as (select substr(criteria,2) as a criterion
    23 split
    where the 24 regexp_like(criteria,'^\+[A-Z]+')
    25                     )
    26, inc_vol as (select substr(criteria,2) as a criterion
    27 split
    where the 28 regexp_like(criteria,'^\+[0-9]+')
    29                    )
    30, exc_state as (select substr(criteria,2) as a criterion
    31 split
    where the 32 regexp_like(criteria,'^\-[A-Z]+')
    33                     )
    34, exc_vol as (select substr(criteria,2) as a criterion
    35 split
    where the 36 regexp_like(criteria,'^\-[0-9]+')
    37                    )
    38-
    39 select *.
    40 t
    where the 41 (exists (select 1
    inc_state 42
    43 where inc_state.criteria = t.state
    ((44) or (select count (*) in inc_state) = 0)
    45 and (exists (select 1
    46 by inc_vol
    where the 47 inc_vol.criteria = t.volume
    ((48) or (select count (*) in inc_vol) = 0)
    49 and (not exists (select 1
    50 to exc_state
    where the 51 exc_state.criteria = t.state
    ((52) or (select count (*) in exc_state) = 0)
    53 and (not exists (select 1
    exc_vol 54
    where the 55 exc_vol.criteria = t.volume
    ((56) or (select count (*) in exc_vol) = 0)
    57.

    ST VOLUME
    -- ----------
    HE 90
    90

  • SQL only: WHERE Condition pulled the correct runtime of the Central "SQL" tab

    I have a requirement that seems like it should be easy to solve in SQL, but me seems to be stuck with blinders and can't see the solution.

    The 'problem' that I'm trying to solve is to get several reporting units to any use of the SQL even in their where clause for certain types of metrics reports. So this is the solution I am proposing that we store the sql in a central table, which, in a simplified form, would have two columns as:

    GroupName Varchar2 (2000)
    SQL_Filter Varchar2 (5000)


    What I want to do conceptual, it's allow the user (even if they're using MS - SQL) to


    WHERE FunctionName (GetSQL_ForGroupName)

    But first of all, I would tell them that this can be done in Oracle sql. However, I can't understand how to achieve this end. From what I've read so far that oracle will not do:

    WHERE (subquery that returns SQL)

    or (in SQL)

    WHERE VariableSubstition

    or

    WHERE FunctionName (GetSQL_ForGroupName)

    It seems that these things in the WHERE clause allows Oracle after only

    FieldName [operator]

    as in

    WHERE price > (subquery)

    or

    WHERE ID IN (Value) Function

    Is it possible to do a subquery (or anything else) that allows me to draw the where clause running SQL - using only SQL? I can do this with a stored procedure, but it is to say it seems to me I had start coding select specific instructions for them or code so that they could enter select statements (or joins etc.). I don't want to write a complete dynamic reporting engine. I want to do is be able to pull the sql running. This ensures that everyone is 1) with the good sql for metrics 2) by using the same sql and 3) the core sql parameters can be stored in one place instead of 3000 definitions of the various reports.

    I must be looking at this the wrong way, I think. The solution does NOT seem to do WHERE (pull in the SQL running)... but I was not able to find a different way of thinking. For example, WITH does not resolve as you immediately the requirement WHERE fieldname [operator] [subquery | function]. I was browsing the internet and looking through all the books SQL on Safari of O'reilly but I have not met a solution. However, I think, this issue of 'centralization of base SQL' must have been resolved several, several times previously. Why can't I find anything on it then?

    Brad

    You might use a pipeline function to return a TABLE object. This function accepts a parameter that contains the name of the Group (although "GetSQL_ForGroupName" is supposed to represent). The query that they deliver will then look something like this:

    SELECT column_list
    FROM   TABLE(table_function('GroupName'))
    WHERE  additional_conditions
    

    In the function, you can create the SELECT statement that channels the rows in the table with WHERE conditions pulled a table for the provided group name.

  • Need to SQL query to filter records by limited rows and certain condition

    Hello guru (s).

    I need a SQL query for help.
    For an example table t1 as below, I want to find the maximum of 5 larger, but there should be no more than 2 name of the same position. The "BOLD" is the response of desire.

    Name Position size
    N1 P1 5
    N2 P2 50
    N3 P3 500
    N4 P1 6
    N5 P2 60
    N6 P3 600
    N7 P1 7
    N8 P2 70
    N9 P3 700

    Thank you.

    not tested!

    select name,position,size,
      from (select name,position,size,
                   row_number() over (order by size desc) a_count
              from (select name,position,size,
                           row_number() over (partition by position order by size desc) a_count
                      from your_table
                   )
             where a_count <= 2
           )
     where a_count <= 5
    

    Concerning

    Etbin

  • explain query plan uses no unique index with where condition

    Hi all

    I use in the 10.2.0.5 oracle database Enterprise edition 64-bit on 64-bit windows server 2008.

    I'm following this tutorial on my own table

    Guide to understanding Oracle QUERY PLAN - 10 minutes

    my questions are below

    Analyze table LIB_CLASSIFICATIONS compute statistics;
    explain plan for  SELECT class_id  FROM lib_classifications WHERE class_no = '538' ;
    select * from table(dbms_xplan.display);
    

    the result is less than

    Hash value of plan: 3022072076

    -----------------------------------------------------------------------------------------

    | ID | Operation | Name                | Lines | Bytes | Cost (% CPU). Time |

    -----------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                     |     1.    10.     5 (0) | 00:00:01 |

    |*  1 |  TABLE ACCESS FULL | LIB_CLASSIFICATIONS |     1.    10.     5 (0) | 00:00:01 |

    -----------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    1 - filter ("CLASS_NO" = '538')

    DESC LIB_CLASSIFICATIONS

    Name of Type Null

    ----------------- -------- -------------

    CLASS_ID NOT NULL NUMBER (10)

    CLASS_DESC VARCHAR2 (50)

    REMARKS VARCHAR2 (250)

    CLASS_NO VARCHAR2 (20)

    CLASS_TYPE VARCHAR2 (10)

    CREATE_USER VARCHAR2 (10)

    MODIFY_USER VARCHAR2 (10)

    CREATE_DATE DATE

    MODIFY_DATE DATE

    CLASS_CATEGORY_ID VARCHAR2 (10)

    class_id has a primary key.

    now when I remove the condition where the query, the result is lower;

    Analyze table LIB_CLASSIFICATIONS compute statistics;
    explain plan for  SELECT class_id  FROM lib_classifications ;
    select * from table(dbms_xplan.display);
    

    the result is less than

    Hash value of plan: 262704430

    ------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    ------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |             |  1558.  6232.     2 (0) | 00:00:01 |

    |   1.  FULL RESTRICTED INDEX SCAN FAST | SYS_C005653 |  1558.  6232.     2 (0) | 00:00:01 |

    ------------------------------------------------------------------------------------

    now it's using indexes with INDEX FAST FULL SCAN.

    I need the index using the WHERE condition as well.

    How to do this?

    Thank you.

    you have indexes on the column class_id not on class_no column how u would expect index to use when there is no index on the column class_no

  • How to make a sum of text_field or column with where condition?

    Hi all

    In Oracle forms 6i, I created a form in which there are 5 text_Items (with 20 none of the displayed fields) namely ACCOUNT FD DO, AMOUNT, INTEREST RATE, STATUS and INTEREST_YEAR.

    FD ACCOUNT NO.

    AMOUNT

    INTEREST RATE

    STATUS

    INTEREST_YEAR

    47665

    50000

    1. 11.5

    E

    5750

    37463

    60000

    12

    D

    7200

    47651

    100000

    1. 12.5

    D

    12500

    34766

    70000

    11

    E

    7700

    I want to make the sum of the INTEREST_YEAR where status = 'E '.

    I created a TOTAL_INTEREST_YEAR name field in which I want to display the sum.

    How the sum with where condition?

    Thank you.

    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

    Oracle form Builder 6i.

    Michael,

    When you write the formula for a calculated item, it does not use PL/SQL expressions (to include built-in DECODING) in Forms 6i.  If there was no conditional control over your calculation, you can simply make your article a summary point and perform the summation over column interest_rate .  However, because your calculation depends on the value in the STATUS column, you will need to use a combination of a calculated item and a summary article because you can't use an IF, DECODE or any other PL/SQL statement in the formula for the calculated item.  Therefore, you need to create a function in the knot of program units and call the function in your formula.  I tested it using the following code and it worked correctly.

    First, create the following function in the node of the object browser program units.

    FUNCTION calc_interest RETURN NUMBER IS
         n_ret_val  NUMBER := 0;
     BEGIN
       IF ( :YOUR_BLOCK.STATUS = 'E' ) THEN
           n_ret_val := :YOUR_BLOCK.interest_rate;
       END IF;
       RETURN n_ret_val;
    END calc_interest;
    

    First, you must change the property to BLOCK request all archives = Yes

    Then, open the palette of your calculated item property, and set the following properties:

    1. calculation = Formula

    2 property Forumla = CALC_INTEREST

    3. point data base = No.

    Now create a second item in the table not based on in your block that will display the amount of the interests summarized.  Open the palette property for this element and set the following properties:

    1 Data Type = number

    2 calculation Mode = Summary

    3. function = sum

    4 summarizes point = "name of your element calculated.

    5 base of data point = No.

    6 canvas = "your canvas.

    When you query your block, you should see the sum of all records where STATUS = 'E '.

    It worked for me, in my example form that I created so this should work for you.

    Craig...

  • Urgent need for sql query

    Hi all
    Sorry I can't speak English very well
    =======================
    I have a table that contains two columns
    table name: total_sal
    column name: hire_date
    column name: salary

    table syntax

    create table total_sal (hire_date date
    number (6.2)) of salary;
    _________________________________________
    Example of data in table format

    hire_date | salary
    01/01/2011 | 1000
    01/02/2011 | 2000
    01/05/2011 | 500
    01/09/2011 | 400


    I NEED a SQL QUERY to display the table, as in this example

    OF | TO|||||||||||| TOTALSALAY
    01/01/2011 | 01/02/2011 | 3000
    07/05/2011 | 01/09/2011 | 900
    |||||||||||||||||||||||||||||||||| 3900
    /* Formatted on 9/23/2011 10:14:40 AM (QP5 v5.149.1003.31008) */
    WITH t
            AS (SELECT TO_DATE ('1/1/2011', 'mm/dd/yyyy') hire_date, 1000 salary
                  FROM DUAL
                UNION
                SELECT TO_DATE ('2/1/2011', 'mm/dd/yyyy'), 2000 FROM DUAL
                UNION
                SELECT TO_DATE ('5/1/2011', 'mm/dd/yyyy'), 500 FROM DUAL
                UNION
                SELECT TO_DATE ('9/1/2011', 'mm/dd/yyyy'), 400 FROM DUAL)
    SELECT "From", "To", totalsalary
      FROM (SELECT hire_date "From",
                   LEAD (hire_date) OVER (ORDER BY hire_date) "To",
                   salary + LEAD (salary) OVER (ORDER BY hire_date) totalsalary,
                   ROW_NUMBER () OVER (ORDER BY hire_date) rn
              FROM t)
     WHERE MOD (rn, 2) = 1
    UNION ALL
    SELECT NULL, NULL, SUM (salary) FROM t
    
    From     To     TOTALSALARY
    1/1/2011     2/1/2011     3000
    5/1/2011     9/1/2011     900
              3900
    
  • For all the records for each record double, I need to get a single column with null or 0.

    Hi all

    I have a requirement where I need to get all the records, for each record in double, I need to get a single column with null or 0.

    create table a1

    (

    Identification number,

    VARCHAR2 (100), the point

    part varchar2 (100));

    Insert into a1

    values (1, 'ABC', 'A1');

    Insert into a1

    values (2, 'DEF', 'A2');

    TABLE A

    PART ITEM ID

    1 ABC A1

    1 ABC A1

    1 ABC A1

    DEF 2 A2

    DEF 2 A2

    3 DEF A2

    O/P

    PART ITEM ID

    1 ABC A1

    1        ABC             0

    1        ABC             0

    DEF 2 A2

    2       DEF              0

    3       DEF              0

    Thanks in advance.

    Thanks for your help FrankKalush...

    This one will work.

    WITH got_r_num AS

    (

    SELECT NVL (a1.id, a1.id) as id

    NVL (a1.item, a1.item) AS element

    NVL (a1.part, a1.part) IN the framework

    a1.id AS a_id

    ROW_NUMBER () OVER (PARTITION BY a1.id

    ORDER BY NULL

    ) AS r_num

    BY the a1

    )

    SELECT id

    element

    CASE

    WHEN a_id IS NOT NULL

    AND r_num = 1

    THEN part

    ELSE ' 0'

    END in the framework

    OF got_r_num

    ;

  • Need of SQL for below scenerio.

    Hi Experts,

    Consider a Table of orders with the next table with a few examples of data structure:

    ORDER_DAY

    ORDER_ID

    PRODUCT_ID

    QUANTITY

    PRICE

    1 JULY 11

    O1

    P1

    5

    5

    1 JULY 11

    O2

    P2

    2

    10

    1 JULY 11

    O3

    P3

    10

    25

    1 JULY 11

    O4

    P1

    20

    5

    JULY 2, 11

    O5

    P3

    5

    25

    JULY 2, 11

    O6

    P4

    6

    20

    JULY 2, 11

    O7

    P1

    2

    5

    JULY 2, 11

    O8

    P5

    1

    50

    JULY 2, 11

    O9

    P6

    2

    50

    JULY 2, 11

    Ø10

    P2

    4

    10

    Need of SQL to get all of the products that sold both days and the number of times where the product is sold.

    Desired output:

    PRODUCT_ID

    COUNTY

    P1

    3

    P2

    2

    P3

    2

    Thank you and best regards,

    Sumanth Kulkarni

    Select

    product_id

    count (*)

    orders

    Product_id group

    Having count (distinct order_day) = 2

    -generic change last line to

    -having count (distinct order_day)

    -- =

    -(select count (distinct order_day) of orders)

    Post edited by: extended chris227

  • Based where conditional clause...

    dear team,
    i have following code..
    
    Declare
      gv_flag1 Varchar2(1)   := 'N';
      gv_flag2 Varchar2(1)   := 'N';
      gv_flag3 Varchar2(1)   := 'N';
      all_where1       Varchar2(250);
      all_where2       Varchar2(250);
      ALL_where3       Varchar2(250);
      V_QTY           Number;
    Begin
      If gv_flag1 = 'N' Then
         all_where1 := 'AND '||'V.OWNER = ''PROD''';
      End If;
      DBMS_OUTPUT.PUT_LINE(all_where1);
      
      If gv_flag2 = 'N' Then 
         all_where2 := 'AND '||'V.OPERATION NOT LIKE (''10%'')';
      End If;   
      DBMS_OUTPUT.PUT_LINE(all_where2);
      
      If gv_flag3 = 'N' Then
         all_where3 := 'AND '||'V.OPERATION NOT LIKE (''07%'')';
      End If;
      DBMS_OUTPUT.PUT_LINE(all_where3); 
       
      --select based on conditions..
    End; 
    
    NOW I want where conditions in select statment to be conditional...
    
    which means if flag1='N' and flag2 = 'N' then use both all_where1 and all_where2 in *where* clause statement...
    if flag1='N' and flag3 = 'N' then then use all_where1 and all_where 3 in *where* clause of select statement...
    if all there flag = 'N' then use all_where conditions in *where* clause of select statement...
    
    i have 3 flags, which means total of 9 combinations,  is there any simpler way to do such kind of thing??
    
    please assist me
    
    nic

    Nicloei W wrote:
    Hi Jeenesh,

    What happens if Flag2 = 'Y' and Indicateur3 = 'Y' in this case, I want only the condition with Flag1

    concerning
    NIC

    SQL> ed
    Wrote file afiedt.buf
    
      1  Declare
      2    gv_flag1 Varchar2(1)   := 'N';
      3    gv_flag2 Varchar2(1)   := 'Y';
      4    gv_flag3 Varchar2(1)   := 'Y';
      5    --all_where1       Varchar2(250);
      6    --all_where2       Varchar2(250);
      7    --ALL_where3       Varchar2(250);
      8    lc_query varchar2(1000):= 'select count(*) from test v ';
      9    lc_where varchar2(500) := ' where 1 = 1 ';
     10    V_QTY           Number;
     11  Begin
     12    If gv_flag1 = 'N' Then
     13       lc_where := lc_where||' AND V.OWNER = ''TEST''';
     14    End If;
     15    If gv_flag2 = 'N' Then
     16       lc_where := lc_where||' AND V.OPERATION NOT LIKE ''10%''';
     17    End If;
     18    If gv_flag3 = 'N' Then
     19       lc_where := lc_where||' AND V.OPERATION NOT LIKE ''07%''';
     20    End If;
     21    lc_query := lc_query||lc_where;
     22    dbms_output.put_line(lc_query);
     23    dbms_output.put_line('-----------');
     24    execute immediate lc_query into v_qty;
     25    dbms_output.put_line('Count: '||v_qty);
     26* End;
    SQL> /
    select count(*) from test v  where 1 = 1  AND V.OWNER = 'TEST'
    -----------
    Count: 3
    
    PL/SQL procedure successfully completed.
    
  • questioning... where column_name is not null

    Hi all
    I have a table that contains documents 160 million (140 GB) and I need to interview as below...

    Select max (start_date) from table_name where column_name is not null

    No clue on column_name and most of the values is NULL value, but I want data wherever the values in the columns are not null
    The query should not be used in application but to check some data and it takes more than 2 hours and no results yet.

    Can anyone of you help me to write the request in the best way...

    Thank you

    >
    I have a table that contains documents 160 million (140 GB) and I need to interview as below...

    Select max (start_date) from table_name where column_name is not null

    No clue on column_name and most of the values is NULL value, but I want data wherever the values in the columns are not null
    The query should not be used in application but to check some data and it takes more than 2 hours and no results yet.
    >
    He has no choice but to do a full table without index scan.

    So the only option I know to speed it up would be to use at the same time. You have a license for the parallel option?

    select /*+ parallel (4) */ max(start_date) from table_name where column_name is not null
    

    And when you do things like this you want to do as much as you can at the same time since the 2nd, 3rd, etc. are basically free. Which means you might as well do MIN, MAX on other columns, on what you might need them.

  • Shot summary of a where condition clause...

    I have a form that displays the code material and this number in which different warehouses...

    It is possible to create an element of the summary screen is based on the place where the condition

    for ex.
    SQL> select  sum(arar) from tbs;
    
     SUM(ARAR)
    ----------
          1488
    
    for this query i can create a  display item and in the propery  pallete  i can select mode as summary,
    summary function as count, and select respective block and item...
    
    what i want to know is can this be based on where condition 
    some thing like the count shoudn't include where the column values is zero
    SQL> select count(arar) from tbs where arar!='0';
    
    COUNT(ARAR)
    -----------
            144
    Published by: Chase Suhail on November 9, 2010 22:45

    Hello

    Create a column of formulas no database in the same block to say 'NON_ZERO.
    The formula for the column would be: SET_NON_ZERO - this function returns 1 if arar is non-zero and 0 if it is zero.

    FUNCTION SET_NON_ZERO RETURN NUMBER IS
    BEGIN
     IF :ARAR = 0 THEN
       RETURN (0);
     ELSE
       RETURN (1);
     END IF;
    END;
    

    Now you can create a column of synthesis and use the text-to-speech function 'sum' and item summarised as "NON_ZERO.

    I hope this helps.

    Best regards

    Arif Khadas

  • ADF: Re-apply the where condition of a view object and updating table

    Hello

    I have a table for documents, with columns for the title of document, document type and so on. There is also a column called "receiver".
    In the viewobject based on the table, I have a condition that only the lines where the receiver is null should be included. In other words: only documents unassigned should be indicated in the table.

    The purpose of the page that contains the table is to assign documents to the receivers. The idea is that the user enters a name in the column of a receiver or several lines and then press a button of validation.
    When a line - a document - has been assigned to a receiver and the change is committed, this line is more fills the where of the viewobject condition and I would like my page to reflect the fact that. In other words: as soon as one or more lines have been assigned to a receiver and the changes are committed, the lines should disappear from the table and the page.

    What is the best way to achieve this?

    Kind regards
    Andreas

    To do this is to add a navigation case to the same page and use this case to navigation after validation. Should run the query again, it costs you a full page sent.

    Another way to do the validation and the use of a managed method bean to re run the iterator.

    Timo

Maybe you are looking for

  • HP15-f279nr: BCM43142

    Just got a HP15-f279nr, tyring configure wifi dual mode, no luck.  Any ideas?  Thank you

  • Question of broken sansa clip?

    I know its broken because I tried everything to get it to market. So my question is... Can I call to get it replaced? I bought it in December, but I don't have the box more. I see a number of series on the item itself. What are my options? Thank you

  • How can I get my camara photos card to import into my computer

    Original title: How can I get my camara photos card to import into my computer - when I insert the card, the pop-up window does not come to the top so can I import my photos in the photo library. I used to be able to insert my card camara and a pop u

  • Custom bitmap focus problem with toolbar

    Hi all I'm new development of BB. I have screen with the title bar and after a toolbar customized The custom toolbar contains 3 bitmaps in the side chain and the left text right. Logo 'text'---> title bar Image1 image2, image3 "screenName"---> toolba

  • Display Date/time of the Client system

    HelloThe requirement is to display the report run date/time in the result. (Report is developed using Excel template)Following syntax would give me time of the server where BI Publisher is installed.<? xdoxslt:SYSDATE('DD-Mon-YYYY_HH24:MI:SS')? >But,