Need of all invalid records

Hi all

Oracle version: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production

I have following sample data:

Examples of data

WITH DATA AS

(

SELECT '100' GRP 1 January 2012 'EFFECTIVE_DATE', 30 June 2012 TERMINATION_DATE of the DOUBLE

UNION ALL

SELECT '100' GRP 1 JULY 2012 ' EFFECTIVE_DATE, JULY 31, 2012 "OF THE DOUBLE

UNION ALL

' SELECT '100' GRP, 31 JULY 2012 ' EFFECTIVE_DATE, AUGUST 5, 2012 ' DOUBLE

UNION ALL

' SELECT '100' GRP, 1 AUGUST 2012 ' EFFECTIVE_DATE, AUGUST 15, 2012 ' DOUBLE

UNION ALL

' SELECT '100' FIBERGLASS, 2 AUGUST 2012 ' EFFECTIVE_DATE, AUGUST 10, 2012 ' DOUBLE

UNION ALL

"SELECT GRP '100', ' 01-SEP-2012' EFFECTIVE_DATE, AUGUST 2, 2012 ' DOUBLE

UNION ALL

"SELECT GRP '100', ' 01-SEP-2012' EFFECTIVE_DATE, AUGUST 2, 2012 ' DOUBLE

UNION ALL

SELECT '100' GRP 1 OCTOBER 2012, ' EFFECTIVE_DATE, NULL FROM DUAL

)

SELECT * FROM DATA;

The query result

GRP Effective_date termination_date

100. ON 1 JANUARY 2012 30 JUNE 2012

100 1 JULY 2012 JULY 31, 2012

100 31 JULY 2012 AUGUST 5, 2012

100 1 AUGUST 2012 AUGUST 15, 2012

100 2 AUGUST 2012 AUGUST 10, 2012

100 01 - SEP - 2012 AUGUST 2, 2012

100 01 - SEP - 2012 AUGUST 2, 2012

100 null October 1, 2012

Expected results

GRP Effective_date termination_date

100 31 JULY 2012 AUGUST 5, 2012

100 2 AUGUST 2012 AUGUST 10, 2012

100 01 - SEP - 2012 AUGUST 2, 2012

Business rules

I have to get all invalid records according to business rules below

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

-No 1 rank and 2 records valid because that line no 2 effective date will start after the termination date of line no 1

-line no 3 is invalid record as date of entry to start with the termination date of line no 2

-tier 4 is valid record being entry into force or after superior to the previous termination date valid record which is the rank not 2 (July 31, 2012).

-tier 5 is invalid record date of effect is smaller that the previous expiry date

-tier 6 is valid record because the effective date is greater than the previous valid expiration date which is the rank not 4.

-line No 7 is invalid record that the same data exists already, online, no 6

-tier 8 is valid because effective date is greater than previous valid record who is ranked No. 6 date of termination.

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

Really appreciate your assistance in this matter. Thank you

Line

SolomonYakobson wrote:

Solution I posted is, I believe, "as close as this." In general, the task you has no soultion. You must choose the first line from that we begin calculation.

Lies!

I had a few extra cycles and need the practice with the TYPE clause. Primitive, perhaps... but achievable:

Remember, there are other 'rules' I put in which seemed logical (ie the termination date must come after the entry into force).

* shrug *.

WITH DATA AS

(

SELECT GRP '100', TO_DATE('01-JAN-2012','dd-mon-yyyy') EFFECTIVE_DATE, TO_DATE('30-JUN-2012','dd-Mon-yyyy') TERMINATION_DATE of all the DOUBLE union

SELECT '100' GRP, TO_DATE('01-JUL-2012','dd-mon-yyyy') EFFECTIVE_DATE, TO_DATE('31-JUL-2012','dd-Mon-yyyy') FROM DUAL Union all the

SELECT '100' GRP, TO_DATE('31-JUL-2012','dd-mon-yyyy') EFFECTIVE_DATE, TO_DATE('05-AUG-2012','dd-Mon-yyyy') FROM DUAL Union all the

SELECT '100' GRP, TO_DATE('01-AUG-2012','dd-mon-yyyy') EFFECTIVE_DATE, TO_DATE('15-AUG-2012','dd-Mon-yyyy') FROM DUAL Union all the

SELECT '100' GRP, TO_DATE('02-AUG-2012','dd-mon-yyyy') EFFECTIVE_DATE, TO_DATE('10-AUG-2012','dd-Mon-yyyy') FROM DUAL Union all the

SELECT '100' GRP, TO_DATE('01-SEP-2012','dd-mon-yyyy') EFFECTIVE_DATE, TO_DATE('02-AUG-2012','dd-Mon-yyyy') FROM DUAL Union all the

SELECT '100' GRP, TO_DATE('01-SEP-2012','dd-mon-yyyy') EFFECTIVE_DATE, TO_DATE('02-AUG-2012','dd-Mon-yyyy') FROM DUAL Union all the

SELECT '200' GRP, TO_DATE('01-SEP-2012','dd-mon-yyyy') EFFECTIVE_DATE, TO_DATE('02-AUG-2012','dd-Mon-yyyy') FROM DUAL Union all the

SELECT '100' GRP, TO_DATE('01-OCT-2012','dd-mon-yyyy'), EFFECTIVE_DATE, NULL FROM DUAL

)

SELECT the grp, effective_date, termination_date, isvalid, pterm

FROM THE DATA

model

partition (grp)

dimension (ROW_NUMBER() over (PARTITION BY grp ORDER BY effective_date) rn)

measures (effective_date, termination_date, "xxxxxxxx" isvalid, pterm sysdate)

(COMMAND AUTOMATIC rules

IsValid [1] = "VALID."

pTerm [1] = termination_date [1],

IsValid [rn > 1] ORDER BY rn = CASE WHEN effective_date [CV ()] > pterm [CV () - 1]

AND effective_date [CV ()]<>

AND effective_date [CV ()] > effective_date [CV () - 1]

THEN "VALID," ANOTHER 'INVALID' END

pTerm [rn > 1] ORDER BY rn = CASE WHEN isvalid [CV ()] = 'VALID' THEN termination_date [CV ()] ELSE pterm [CV () - 1] END

)

order of grp, effective_date

Results:

GRP EFFECTIVE_DATE TERMINATION_DATE ISVALID PTERM

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

100 1 JANUARY 12 JUNE 30, 12 VALID JUNE 30, 12

100 1ST JULY 12 JULY 31, 12 VALID 31 JULY 12

100 JULY 31, 12 5 AUGUST 12 INVALID 31 JULY 12

100 1ST AUGUST 12 15 AUGUST 12 VALID 15 AUG 12

100 2 AUGUST 12 10 AUGUST 12 INVALID 15 AUGUST 12

100 01 - SEP - 12 AUGUST 2, 12 INVALID 15 AUGUST 12

100 01 - SEP - 12 AUGUST 2, 12 INVALID 15 AUGUST 12

100 1 OCTOBER 12 VALID

01 SEP-200 12 2 AUGUST 12 VALID AUGUST 2, 12

9 selected lines.

I've always liked what can be done in Oracle these days, with all these funky features, tools, provisions and other

Tags: Database

Similar Questions

  • 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

    ;

  • delete all the records in a table, the speed of insertion is not change.

    I have an empty table, and I insert a record need 100ms.
    During this table a 40,0000 trace, I insert a record need 1 s, it's ok, because I need to make a comparison according to an index before inserting a record need, so more record, more time.
    The problem is when I delete all the record in this table, the insertion time is always 1s, not reduce to 100ms. Why?

    Hello

    Read this part of the oracle documentation

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14220/logical.htm#CNCPT004

    The reason is always 1s, because when you inserted 400ko record as HWM (high tide is the border between old and new space in a segment.) moved to the top. And when you remove all records of your HWM still in the same coordinate system and that you have not reset to 0. So when you insert 1 it save free space and after finding faces (usually a regular insertions got 6 steps it inserts data). If you truncate your table you and try it again it will be faster that your HWM is reset to 0.

    Concerning

  • I use LRM6 with Win7.  Cannot display all of the subfolders on external drive with photos.  Can't see most recent used folders.  How can I get all the records to display in the tree when the library module?

    I use LRM6 with Win7.  Cannot display all of the subfolders on external drive with photos.  Can't see most recent used folders.  How can I get all the records to display in the tree when the library module?

    Syrup72 wrote:

    Why I see pictures when I click on the tab all the photos above, which do not show in the tree on the G: drive?

    DSC_2429 is in the shown locaton and present in all the Photos, but there is no folder "Tulsa"... "in the tree.

    The left pane is a "choose one". "All photos" are just that. 'G' is a different option.

    Lightroom is not a file Explorer. He knows only the drives and files that you have imported the photos of. If LR shows not all of the photos that are on your hard drive, it is because you did not import all photos.

    If LR shows you a photo in "all photos" but do not show it in the folder you think he is in, go to "all photos", select the image, right click "view in the library folder. This will show you where LR think the picture is.

  • Need add/update two records on click on the create/update button

    I have a table with 5 columns

    1 ID - primary key

    2 name

    3. address

    4 CARB

    5 KADER

    Now whenever I do an insert in this table to this table I have to add two rows, as shown below:

    1st row - (name1, Add1, 717, 717)

    2nd place - (name1, Add1, 515, 515)

    Name and address values are entries of the screen and the CARB & KADER values are fixed (717 or 515). So for each click on the button create two records needs to be inserted.

    Even when I update to say record particular Carb - 717 & kader-717, I must also update other file too Carb-515 & kader-515. For each click on the update button, so I need to update two records.

    Please tell me as to how I will do this

    Hello

    Why do you not use insert manual and update according to your requirement process?... Gives 'Never' for automatic processing of the DML and try to create a manual process (PL/SQL blocks) and give the condition.

    Thank you

    Lacombe

  • How to upgrade all the record for a particular column in a table based on search criteria.

    Hi all

    I'm new to ADF. I have a requirement where I have to perform the update of mass on a table.

    Scenario:

    Ex: I have a search region manual dept. where I search with deptId: 20. I get 20 records in my table. now I have another area where I have an inputchoice list that contains all the column names that exist in the dept table. Beside that, I have a text box and a button update

    The user now, first research with dept id: 20 and click on the button Search, where it shows 20 record in the table. He then select an input choicelist(ex: ManagerId) column, then enter the new value in the decision-making box(ex: abc) then click on the button update.

    Now, I want to, all the records in the ManagerId column with dept id: 20 update with the new value 'abc '.

    Can someone help me with the code.

    Thanks in advance...

    Hello

    If you go to your VO and generate the ViewObjectImpl, here you can create a method that contains two parameters, 1 the name attribute and 2 the value.

    Then you can follow something as explained in this post:

    ADF tutorial: how to apply actions in bulk to a view object lines

    The only difference is that you must create a method like this:

    ' Public Sub updateAttribute (attribute String, Integer value) {}

    RowSetIterator iter = createRowSetIterator (null);

    While (iter.hasNext ()) {}

    Line = iter.next ();

    row.setAttribute (attribute, value);

    }

    }

    Then execute you who expose a customer interface and then after you filter your table according to your criteria just this method passing the correct parameters.

    Concerning

  • Need help: error creating record

    Hi refugees,

    Gud morning...

    I get this error during the creation of the new record twice (for the first record, it works fine...)

    As master details page, I am Manager differently which... first of all I save the details of masters and while saving the level of detail, I will assingn the id of the header to the attribute display... when I create the first new record and save it works fine... but when I try to create a record more it shows error... This is the code... AMImpl

    It is showing the error in the createRecord() method only... it runs until the row.setNewRowState (Row.STATUS_INITIALIZED) after that only it is throwing error (assigning values for the attributes of display...) But for the first record it works fine...

    Please... give your valuable suggestions...

    ' Public Sub createRecord (pageContext OAPageContext, OAWebBean webBean)

    {

    saveMasterDtls (pageContext, webBean);

    String vunitid = pageContext.getParameter ("ctrlUnitId");

    String vapproval_id = pageContext.getParameter ("ctrlApprovalId");

    OAViewObject vo = getcapexApprovalHierarchyVO1();

    Try

    {

    String ctrl_headerId = null;

    Conn connection = (Connection) pageContext.getApplicationModule (webBean) .getOADBTransaction () .getJdbcConnection ();

    String query = "select header_id OF XXNH_CAPEX_APPROVALS where unit_id =: 1 and APPROVAL_id =: 2;

    PreparedStatement stmt = conn.prepareStatement (query);

    stmt = conn.prepareStatement (query);

    stmt.setString(1,vunitid);

    stmt.setString(2,vapproval_id);

    ResultSet rs = stmt.executeQuery ();

    RS = stmt.executeQuery ();

    While (RS. Next())

    {

    ctrl_headerId = rs.getString (1);

    System.out.println ("id of the header in all new record:" + ctrl_headerId);

    }

    If (! vo.isPreparedForExecution ())

    {

    searchRecords (pageContext, webBean);

    }

    Line line (Row) = vo.createRow ();

    vo.insertRow (row);

    row.setNewRowState (Row.STATUS_INITIALIZED);

    System.out.println ("before assigning values id...");

    vo.getCurrentRow () .setAttribute ("HeaderId", ctrl_headerId);

    vo.getCurrentRow () .setAttribute ("UserUnitId", vunitid);

    }

    catch (System.Exception e)

    {

    throw new OAException ("error creating record:" + OAException.ERROR, e);

    }

    }

    =======================

    ' Public Sub saveMasterDtls (pageContext OAPageContext, OAWebBean webBean)

    {

    / * checking already Masters details existed or not for unity & approval * /.

    System.out.println ("master dtls start");

    String v_unitid = pageContext.getParameter ("ctrlUnitId");

    String v_unitName = pageContext.getParameter ("ctrlUnitName");

    String v_approval_name = pageContext.getParameter ("ctrlApprovalName");

    String v_approval_id = pageContext.getParameter ("ctrlApprovalId");

    OAApplicationModule am = pageContext.getApplicationModule (webBean);

    int cnt = 0;

    Try

    {

    Connection pconn = (Connection) pageContext.getApplicationModule (webBean) .getOADBTransaction () .getJdbcConnection ();

    String pquery = "select count (*) FROM XXNH_CAPEX_APPROVALS where unit_id =: 1 and APPROVAL_id =: 2;

    PreparedStatement stmt = pconn.prepareStatement (pquery);

    stmt.setString(1,v_unitid);

    stmt.setString(2,v_approval_id);

    ResultSet rs = stmt.executeQuery ();

    While (RS. Next())

    {

    CNT = rs.getInt (1);

    }

    System.out.println ("count is:" + cnt);

    If (cnt == 0)

    {

    System.out.println ("If condition start");

    Tran OADBTransaction = getOADBTransaction();

    Number v_header_id;

    v_header_id = am.getSequenceValue ("XXNH_CAPEX_APPROVAL_SEQ");

    capexApprovalVOImpl vo = getcapexApprovalVO1();

    If (!) VO.isPreparedForExecution ())

    {

    vo.executeQuery ();

    }

    Line = vo.createRow ();

    row.setNewRowState (rank. STATUS_INITIALIZED);

    row.setAttribute ("UnitId", v_unitid);

    row.setAttribute ("UnitName", v_unitName);

    row.setAttribute ("ApprovalName", v_approval_name);

    row.setAttribute ("ApprovalId", v_approval_id);

    row.setAttribute ("HeaderId", v_header_id);

    vo.insertRow (row);

    getTransaction () .commit ();

    System.out.println ("unless condition end");

    }

    on the other

    {

    capexApprovalVOImpl vo = getcapexApprovalVO1();

    vo.executeEmptyRowSet ();

    }

    }

    catch (System.Exception e)

    {

    throw new OAException ("error in recording: master Dtls prepare Stmt query:" + OAException.ERROR, e);

    }

    }

    ============================================

    ' Public Sub searchRecords (pageContext OAPageContext, OAWebBean webBean)

    {

    String v_unitid = pageContext.getParameter ("ctrlUnitId");

    String v_approval_id = pageContext.getParameter ("ctrlApprovalId");

    OAViewObject vo = getcapexApprovalHierarchyVO1();

    vo.setMaxFetchSize(-1);

    vo.setWhereClause (null);

    vo.setWhereClauseParams (null);

    int v_header_id = 0;

    Try

    {

    Connection pconn = (Connection) pageContext.getApplicationModule (webBean) .getOADBTransaction () .getJdbcConnection ();

    String query = "select header_id from xxnh_capex_approvals, including 1 = 1 and = unit_id: 1 and APPROVAL_ID =: 2;

    PreparedStatement stmt = pconn.prepareStatement (query);

    stmt.setString(1,v_unitid);

    stmt.setString(2,v_approval_id);

    ResultSet rs = stmt.executeQuery ();

    While (RS. Next())

    {

    v_header_id = rs.getInt (1);

    vo.setWhereClause ("HEADER_ID =" + v_header_id);

    }

    vo.executeQuery ();

    }

    catch (System.Exception e)

    {

    throw new OAException ("error in query records...") Prepare the query Stmt: "+ OAException.ERROR, e);

    }

    }

    ============================================================

    Best regards and thanks,

    Jaya...

    Jaya,

    could you please check if the Id of the header is marked as primary key in database level or the level of the view object.

    Concerning

    GYAN

  • [Error] Domain already exists. Please delete all related records

    Hello

    I used to have a single domain (jhuachu.tw), I deleted the Board and trying to add the field.

    but it showed the error message saying "field already exists. "Please delete all the records associated with this area before there time.

    so I erase all files and data, but still does not work.

    I saw some post last year, there could be a problem in the Adobe database.
    Staff please help me clear the field of database Adobe? and I'll add again.

    Forward to your return to writing. Thank you.

    Support of BC contact directly (at the top right of your site under the support section)

  • How to recompile all invalid objects apps?

    Hi all:
    How to recompile all invalid objects apps? my environment is ORACLE 9.2.0.5 32bits.





    Concerning
    Terry

    Yes,

    Compile the drawing APPS

  • Need to rename 277 records at the same time... Help!

    I'm a new employee. I need to put his name on all records containing the old name of employees. I used 'Search' to find all records (277), I selected all the and choose 'Rename' but it only changes one.  Can it be done?

    It can be done by script

    Here you will find some information

    http://www.visualbasicscript.com/script-to-rename-lots-of-folders-m34580.aspx

  • Mystery Microsoft Files-Do I have need of all these files or can I delete the batch?

    I have 3 files on my C drive, all named as a string to a number, for example 6a34b3f7ad5039dc26e3c4. In these cases, there is a 25 folders numbered 1025, 1028, 1030 1031 etc over a folder 'graphics' and 'customer '. then there are all the other files inclusing .bmp for microsoft.NET and set up etc. In the numbered records are 3 files, Eula.rtf (clearly Microsoft but all in Japanese), LocalizedData.xml and SetupResources.dll.

    I need all these files or do I have to delete the batch? I'm guessing that they are something to do with the windows updates...

    Thank you

    These are usually leftovers from Windows Update and can be deleted safely after you restart your computer to make sure that they are not in use and/or staged for an update that will continue after a reboot.

    "2toerags" wrote in the new message: * e-mail address is removed from the privacy... *

    * I have 3 files on my C drive, all named as a string to a number, for example 6a34b3f7ad5039dc26e3c4. In these cases, there is a 25 folders numbered 1025, 1028, 1030 1031 etc over a folder 'graphics' and 'customer '. then there are all the other files inclusing .bmp for microsoft.NET and set up etc. In the numbered records are 3 files, Eula.rtf (clearly Microsoft but all in Japanese), LocalizedData.xml and SetupResources.dll. *

    I need all these files or do I have to delete the batch? I'm guessing that they are something to do with the windows updates...

    Thank you

  • Need to obtain equal records the number of days of the month.

    Dear all

    My table and its data is given:

    Table name: Transaction_Master

    Trn_Num Trn_Dte
    1January 2, 2014
    2January 3, 2014
    3February 15, 2014
    4December 29, 2013
    5December 30, 2013
    and so on

    Now, I wish that my query must return equal records the number of days for each month of Trn_Dte. Be careful, I don't have Trn_Num column in my result. Its cities here only for explanation.

    It should, for example, records 31 to January 31 to December and 28 February.

    I tried following query but it passes loop and my db session gets hang.

    With T as

    (

    Select Distinct (Trn_Dte, 'Month') To_Char Trn_Mon, To_Number (To_Char (Last_Day (Trn_Dte), 'DD')) Tot_Day

    Of Transaction_Master

    Where Trn_Dte between parameter_1 and PARAMETRE_2

    )

    Select Distinct Trn_Mon, level

    T

    Connect by level < = Tot_Day

    Order By Trn_Mon, level

    Could you give me a solution for this case?

    Another solution for your exact needs. Try this and let me know in case of any problems. Because I changed the connection by the clause double itself.

    SELECT DISTINCT TRUNC (Trn_Dte, 'MY') + (lvl - 1)

    OF Transaction_Master aa (SELECT LEVEL lvl

    OF the double

    CONNECT BY LEVEL<= 31)="">

    WHERE Trn_Dte<= to_date('15-feb-2014','dd-mon-yyyy')="" ---="" add="">

    AND TO_CHAR(Trn_Dte,'MON') = TO_CHAR (TRUNC(Trn_Dte,'MON') + (lvl-1), 'MY');

  • Query in SQL to display the count of all the records, but where condition is present

    Hi all
    I have the situation where I have to show number of all records in all the particular period but where the condition type condition must be present:

    Please find below sample data:
    PERIOD_ID TYPE MV_COUNT IS_FLAG
    20110401 AM 1 0
    20110401 AM 1 0
    20110401 MS 29 0
    20110501 MS 1 0
    MS 14 20110601 0
    20110701 MS 2 0
    20110401 MS 1 0
    20110401 AM 2 0
    20110401 AM 69 0
    20110401 AM 2 0

    Finally, I need to type = MS
    (i) is_flag total count for all periods
    (II) for the period = 20110501 this is the mv_count

    I need to use the unique table time (i.e. outer joins self-join not)
    I tried using the partition by clause, but it will filter the data.

    See you soon,.
    SP

    842106 wrote:
    Finally, I need to type = MS
    (i) is_flag total count for all periods
    (II) for the period = 20110501 this is the mv_count

    I need to use the unique table time (i.e. outer joins self-join not)
    I tried using the partition by clause, but it will filter the data.

    select sum(is_flag) is_flg_count,
             sum
                (
                 case when period = 20110501 then mv_count else 0 end
                ) mv_cnt_for_20110501
    from your_table
    where type = 'MS';
    
  • Add all the records in the report parameter

    I am trying to create a report parameter using a lov.
    You can choose a single element or to return all

    Is the source of my lov
    SELECT l.extkey||' - '||l.longdescr a,  l.clocid b
    from udm_cloc l, udm_cust c, udm_lde lde
    where l.custid = c.custid
       and c.ldeid = lde.ldeid
       and lde.ldekey = :F140_LDEKEY
    and l.closedate is null
    and l.orddcid = :P9_DCID
    union
    select 'ALL Records' a,'ALL' b from dual
    ORDER by 2
    But I get an error message
    "LOV query is not valid, a display and a return value is needed, the column names must be different. If your query contains a query online, the first CLAUSE in the SQL statement must not belong to the query online. »

    Any ideas?

    Gus

    Central unit that

    AND ((clocid =: P9_CLOCID) OR)
    (NVL(:P9_CLOCID,'-1') = '-1'))

    Why are putting you clocid is null? Take everything you you select ALL your requirement.
    The condition would be NVL(:P9_CLOCID,'-1') = "(-1').

    Thank you
    Mehabub

  • LOV SQL: How to configure a selection list to get all the records

    Hello

    I use Oracle 10 g with APEX 2.0.

    Here's my question:

    I have a report and I use 3 text fields and a selection list to search in a join of two tables. The selection list is composed of a "list of values" and the parameter is used in the SQL sentence, has a numerical value.

    Table of results after the join operation looks like this:
    Field1 Field2 Field3 Field4 (assuming that the field3 is used in the select list).
    21 has this NL 1000
    21 bis as 1001-vb
    33 so 1012 ct

    What I want to do is put another pair of the value of the parameter in the select list to let the user choose the "ALL" items mentioned in the selection list, so that the search returns all records without taking this select list-field into account.

    Is it possible to do it with SQL and LOV? Do I need other functions? or configurations?

    Thanks in advance,

    Sedef

    Hi user630478!

    I always use a selection with submit list and the option to get a NULL value for such things. To solve your problem do the following:

    1.) create two named LOVs. As you have already done and another for all values.
    2.) to submit your selection list must be configured to display a NULL value e.g. it shows EVERYTHING with the value 0.
    3.) create two conditional branches that work with your selection list. Which show normal results, if a user has clicked on a normal value and the second should act only if a user has clicked on the WHOLE.
    4.) write a process triggering the LOVs in your selection from one to the other list. This process should only be fired if the second conditional branch has been activated.

    As I understand it that's maybe what you want to know.

    Yours sincerely

Maybe you are looking for

  • 10.2 IOS since the installation of iOS 10 Mail no sound nor give any notification.

    I use an iPhone 6s more and now have to check the Mail app to see if there are emails and at this time there, once they were loaded in, appears a badge and my notification sound is played.  I checked the many settings, made a full reset; all to nothi

  • Unable to update to Version 10.2.3 of the CPF

    I have an Imac (mid 2011) running the OSx Version El Capitan 10.11.6. Have bought a legitimate copy of Final Cut Pro X on the Apple Store in July 2011, I am now unable to upgrade to the latest version of the software (10.2.3). The computer showed tha

  • Encountered error Invoke.invokeApplication to AddressBookArguments?

    Hello! I think I found a bug for Addressbookarguments on JDE 4.7 version sibulator. the following code generates the exception of NULL, but however this code works fine on 4.5 and 5.0 beta. Invoke.invokeApplication (Invoke.APP_TYPE_ADDRESSBOOK, new A

  • An email allegedly from the support team

    I received the email.  I guess that it is spam, but I assure you.  Please notify: Due to the congestion in all Windows Live Mail, Windows Live user accounts should be off several accounts as your email address must be added to the new Windows Live da

  • Try to buy Photoshop subscription in Russia

    I am trying to buy the subscription to, when I select "Russian ruble", it is said that it will be 599 rub. When I proceed to buy it, it changes $ 19.99, which is more than 1300 rub. What's wrong? I want to buy at the price indicated, not 2.5 times mo