Double output on Cascade LOV
Hi all.I spent 3 days of testing in this case, I have the script online at:
http://Apex.Oracle.com/pls/Apex/f?p=78875
I have 3 LOV:
#1 is just ok
#2 needs value between 1 # (returns a copy)
#3 requires value of #2 (returns duplicate also)
The user for the development is test/test123
I really appreciate any help you give me.
my version of the apex is 4.2 also
Thank you!!
Well, I agree, it was weird enough I just had to take a look. I saw fire ajax twice for very strange select statements.
Snooping in your template page I noticed that you had commented on the #BOX_BODY tag #.
#BOX_BODY # is mandatory, so I put back it. I think you could fool APEX because you had it on the page, but it was all inside of a comment.
in any case... I do not fully understand why JS code that refreshes selects it was added twice to the page, but it's fixed now. :)
Just make sure that you have your BOX_BODY tag in all your pages. Even if you don't want to use it. :)
Oh and FYI, the elements need not be added to the Articles Page to submit because the list of element Parent of Cascade LOV already takes care of this.
Assistance on the ground + "you can then use these page elements in the where clause of your SQL statement"list of values"". "+"
Saludos,
-Jorge
Published by: jrimblas on May 9, 2013 22:46
Tags: Database
Similar Questions
-
Reuse cascading LOV in several pages?
For example, if you page elements to make the car and identify the model, model car as element Parent LOV cascade so that every time the car has changed, the LOV for model would be updated. (Copied from documentation: P)
Thus, the request for model car LOV is defined as
select car_model d, car_model r from car_models where car_make=:CAR_MAKE
And on the page, I establish a page CAR_MAKE and use it as the "Cascading LOV Parent article (s). So far so good.
I want to use this LOV in another page. The problem is, APEX reject create me CAR_MAKE in another page, saying "name of the element is already used by another page or application.
Addition of the LOV even for each page (only using linked different variable name), is there a solution?
I thought to use a copy of the car to point application dynamic action game and referred to the point of Application in the LOV. Is it guaranteed that the dynamic action complete before the LOV is updated?
Request Express 4.2.0.00.27
Oracle 11g XE
thtsang
If the parent element names differ only in the number of page as in your example, you can use:
select car_model d, car_model r from car_models where car_make=v('P'||:app_page_id||'_CAR_MAKE')
Beware that you add the element relative to Cascading article (s) Parent LOV because apex generator won't recognize him.
In this way, that you don't have to change the standard LOV when used on a new page.
Nicolette
-
Hello
I searched for the answer for a while now, but could not find a solution to my problem. It's a rather trivial issue, but after dealing with more urgent problems, I stuck with it and I can't move forward I use Apex 4.2.1
OK, lets start with a description.
I have two selection lists. After making a choice in the first, I would like to than the second value to change. It is not cascade LOV case, however, at least I don't.
Let me give you an example. Suppose we have a table with name and default to the occupation.
Name By default occupancy John Doctor Mark Firefighter George Firefighter Tom Concierge End user first selects the name in the first list, then the occupation of another. It's perhaps not clearly in the example given, but the order of the questions.
What I want is to force a change in the second value in the list after a choice in the first. So after the name is chosen, the occupation should switch to the default.
The assignment is the most typical, but not the only one. So I want the end user to be able to change the occupation if necessary. Tom of sense is not to be janiotor, it can be whoever he wants this is why it is not cascade LOV problem.
I tried with dynamic action - definition of value and then refresh. It works when the second selection list is the text field. I can't find a way to make it work with another selection list.
Hope you can help.
Concerning
AEMs salvation,
What I wanted with display and return value, you usually have a list of selection like this query:
SELECT occupation d, occp_id r
OF professions
If your return value is an identifier. To use the text as return value is rather rare. Where my question, because obviously you must select the return value in your query, NOT the display value.
So let me explain what is a set value. It takes the value of the server by using your query and AJAX in the background, then uses Javascript to set the value of the item in the browser.
At this point your selection list still has the OLD value in the session. Then, you do a refresh and the element uses the old value, and it seems that nothing happens.
So solution:
-clear default values, you don't need those
-get rid of refresh it in your DA
Kind regards
Joni
-
Handling cascading LOV (multi-Select parantes LOV)
Hello
I use LOV cascade.
P1_PARENT - Parent LOV (i.e. multiple selection)
P1_CHILD - child LOV
LOV Parent being multiple selection, so it will have the following values... P1_PARENT = AA:BB:CC
and where clause in the LOV cascading should be like
-How to convert the element value for P1_PARENT of AA:BB:CC to "AA", "BB", "CC"where col1 in (:P1_PARENT)
- Is there an another way manage in cascade LOV (to select several parent LOV).
Select the list of P1_CHILD
Thank youselect d, r from test where col1 = :P1_PARENT where col1 in (:P1_PARENT)
DeepakHi Deepak,
In where clause for the LOV child, you can use instr function as:
(instr(':'||:P1_PARENT||':',':'||col1||':',1) > 0 )
To access the individual elements in the multiple selection: P1_PARENT, you can use:
DECLARE l_selected HTMLDB_APPLICATION_GLOBAL.VC_ARR2; BEGIN l_selected := HTMLDB_UTIL.STRING_TO_TABLE(:P1_PARENT); FOR i IN 1..l_selected.count LOOP // your code here...access individual elements using l_selected(i) END LOOP; END;
Thank you
Rohit -
Loading list select cascade lov
I have three selection list each with a parent lov cascade, except the first.
1 - TOOL
2 - CATEGORY
2. - IN SUBCATEGORY
Of these 3 elements of selection list... what I save is the "return value" of the subcategory, which is an identifier. If the problem appears when I try to change the information after I save it. I tried to extract the information in the "source type" box with an "sql return value" as well as the sector 'default value', but he did show errors when I want to create a new record... So I wonder if I can bring data with javascript or otherwise... Thank you
Best regards, bernardoHello Bernardo.
the problem on your page 3 is that P3_CATEGORY is not automatically by a column of data. That's why when you view an existing record he won't show anything. And because the value is NULL, your 3rd LOV (P3_CATEGORY_ID) won't find something because P3_CATEGORY is null or an invalid value.
You have two options:
(1) add the CATEGORY in the database column to your table of PROBLEMS or
(2) use a calculation or process to extract the CATEGORY based on your subcategory (P3_CATEGORY_ID) and fill P3_CATEGORY with this value. This calculation/process to trigger after the process of "fetch".See my calculation of example on page 3. In addition I also put P3_TOOL as "Page to go" for P3_CATEGORY_ID LOV, because you always have to specify all the columns that are used in the SQL statement 'Cascading LOV Parent éléments' or 'Page to present '.
Hope that gives you a direction.
Concerning
Patrick
-----------
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
Cascade LOV display text (based on LOV) report clasic
Hi Experts,
It is possible to use cascade LOV - item is displayed as text (based on LOV) in clasic report? (Display AS)
I would like to refer to another column displayed in the report in LOV.
Example:
#PRIM_STATUS # is the column I would like to reference.select description d, val_strg2 r from domain_cntr where cntr_name = 'CH_PRIM_ST_NOTE' and val_strg1 = #PRIM_STATUS# and active_idc = 'Y'
Is this possible? IN THE CLASSIC REPORT
concerning
J :DHello
>
Is this possible? IN THE CLASSIC REPORT
>
Yes.It can one thing long enough to encode, so be prepared for that.
Here's how:
a. use the APEX_ITEM API in your report query. Be sure to only specify the p_item_id parameter, using #ROWNUM #.
b. in the LoV wrtie Parent a trigger of onChange event which triggers a JavaScript function and pass it the ID of the item.
(c) in this JavaScript function makes a call to get AJAX < select >... < option... >... < / select >, in short the full HTML of the child LoV
d. push this HTML fragment in the child Lov. You build the ID of the target based on the ID of the parent. E.g. f01_0001 to f02_0001.
e. you can further keep the invisible or disabled child initially and then make it visible/enable after it is filled.Kind regards
-
Hello
I use APEX 4.1.0.00.32 and I have a simple report as
SQL :*
SELECT * in the region
Region WHERE the like '% "| P3_REGION | » %'
and country like "%" | P3_COUNTRY | » %'
and the city like '% "| P3_CITY | » %'
Elements:*.
P3_REGION:
Select a separate region as d, r of the region of the region
Display the Null value: YES
Value null, display value: - Select -
Return value of NULL: + 0 +.
P3_COUNTRY:
Select distinct country as d, r of the region of the country where region =: P3_REGION
Display the Null value: YES
Value null, display value: - Select -
Return value of NULL: + 0 +.
Cascading LOV Parent article (s): P3_REGION
P3_CITY:
+ select distinct city, city as the region r, whose country =: P3_COUNTRY
Display the Null value: YES
Value null, display value: - Select -
Return value of NULL: + 0 +.
Cascading LOV Parent article (s): P3_COUNTRY
The LOVs work very well and the correct values are displayed if cascade through them
So, I want to the last step to filter the report with the values that were selected in the lovs. And that I does not.
I tried to add a button with the SUBMISSION of the page. After choosing values in all the LOVs and by clicking on the button SUBMIT page supports, alle LOVs are disabled (with value - select-) and the report shows all lines.
I tried to change the "redirecting to Page 3" button and setting the values P3_REGION, P3_COUNTRY, P3_CITY P3_REGION., P3_COUNTRY. & P3_CITY. but without success.
I tried to use the 'Page Action time value' parameter to 'Validate' or 'redirect and set' for all the element LOVs or only the last element LOV, but then the cascade of the LOVs is not working properly and the report does not change.
I am confused as I Don t know what I can do so far. I think this should be a condition easy limit/filter the report with the values in the LOVs.
In addition, it should be possible to choose only the LOV region and then limit the report with this region (not select country and city)
Thanks in advance!I had a problem similar to a previous version, fixed when I updated element Source value or Expression (the section of the Source) to himself.
I mean:
for the P3_REGION, defined as & P3_REGION element.
for the P3_COUNTRY, defined as & P3_COUNTRY element.
for the P3_CITY, defined as & P3_CITY element.It will be useful.
-
Apex 4 Cascading LOV s how to define a child LOV back to the null return value
Hello
My problem is that I use the new dynamic action to implement features of LOV cascading to the Apex 4 which means not having to submit the page to update child LOVs after parent LOV changes.
What I find, is that when you change the value LOV parent, then the child LOV (which has a return value of zero) is not or by default in the return value zero (in my case no selection should return-1) if the list is filtered to a different set of values, which is not a selection valid. The LOV child is left without a choice when I need its default value to the return value zero (-1, which represents all values).
Also, I expected to do before the page is sent and filtering to the bottom of the hierarchy of LOVs can work when the child is zero (-1, which means that all values) and in turn her child LOV (s) will also the child null filter.
Any help would be appreciated.
Thank youHi 804641,
I don't know if I get your problem and I tried to reproduce.
http://Apex.Oracle.com/pls/Apex/f?p=2672:6 is my example with a LOV cascading where I also defined a dynamic action that is triggered when P6_EMPNO changes and it shows the current selection.
Maybe it helps if install you an example on apex.oracle.com and provide space to work/user/pwd, so that I can have a look. I'm not sure about your sentence "help for a new dynamic to implement cascading LOV feature", because dynamic actions are not necessary for LOVs cascading. It is a characteristic of the types of items themselves where you just set the attribute "Cascading LOV Parent éléments".
Concerning
Patrick
-----------
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
Need help cascading LOV in ADF 12.1.3
Hi, I am new to Oracle ADF and try to build an application that needs the functionality LOV cascading.
I was able to create the required LOVs and attach them to the view object. The issue I'm facing is that when creating a new record, when the parent list is changed, the entered values are reset to null. Ideally, only the field of the child must be reset.
I followed all the steps needed to create the LOV cascading and don't know what I've missed.
Here are the screenshots of the application before and after modification of the LOV cascading.
FRONT
-> As soon as the geography is selected the rest of the fields are initialized to NULL. (AutoSubmit is true for geographic areas)
This problem doesn't happen to save the rows that are updated. Only occurs for new records that are created and not yet committed to the database.
No difference, if you set partialSubmit = false on the new button? (of course, the table must have partial trigger that points to the new button)
If this does not help, try setting autosubmit = true on all areas.
And if this isn't help too, try to make array readonly and modify data in the form.
Dario
-
Shuttle with cascade LOV and pre-populating on the right side
Good afternoon
In my form, I have a piece of text to a certain number of tickets, a drop-down list for a site and a shuttle service to the employees of the site. If I select a site in the drop-down list, the shuttle refreshes and I can choose employees.
Here's the wrinkle, if I get a ticket number, it triggers a dynamic action to pick up the site and all selected employees. I checked the values returned and the dynamic action works as expected. When the site is updated, the shuttle refreshes, but the selected employees are not load in the right side of the shuttle.
I tried to divide the dynamic action of the number of the ticket into two pieces: one to select the site and the other to select the selected employees. In the hope that the dynamic actions would be the fire of the order of the site, refresh the shuttle and update the selected employees. But I don't always get the right side of the shuttle, populated. I tried the process a few times with debug and dynamic actions do not always work in the right order, and when they do, the right is not be filled.
I know that the right side of the shuttle can be loaded, but the dynamic action on the ticket number also retrieves the values for another shuttle this shuttle is based on a static select statement.
Any ideas on how to get the right side of the shuttle completed when the selection is based on a LOV cascading?
Another idea, is possible to launch a dynamic action when the left side of the shuttle is filled. Then I could store employees selected in a temporary variable and load them after the shuttle is filled.
Thank you
Ray Gillfillan
I solved my problem.
I added a variable temp for action dynamic ticket number for the value to be set on the right side of the shuttle. I also added a refreshment after a dynamic action on the shuttle to set the value of the right side of the temp variable.
Ray
-
JavaScript allows you to create cascading LOV to the tabular report only works on level 1
I'm trying to implement a LOV cascading to a tabular report. I have been using an example by Denes Kubicek (https://apex.oracle.com/pls/otn/f?p=31517:315). I am able to get this example works when I'm on the workspace hosted APEX (workspacehttps://apex.oracle.com/pls/apex/f?p=67254:1 = COA demo/demo). The example works as expected in the space of organized labor.
My problem is when I take the application and import in a workspace internal APEX LOV Cascading sets the value of the first row in the table report; However, it does not define the following lines, and it does not dynamically change the values in the first rows of LOV, when another Department is selected. I also tested the results by exporting the application on internal site to the hosted site. It works perfectly on the hosted site, but not inside. Our internal APEX site is running version 4.2.2.00.11.
The JavaScript code that is executed in dynamic Action is:
elem var = ' # ' + this.triggeringElement.id;
var = key "#", "f02_" + this.triggeringElement.id.substring (4);
var set_list = ' # ', 'f04_' + this.triggeringElement.id.substring (4);
var key_val = $(key) .val ();
var elem_val = $(elem) .val ();
var selected_val = ";
(apex). Server.Process
"getEmployees"
{
x 01: elem_val,.
x 02: key_val
},
{
success: function {(pData)
$(set_list).find('option').remove ();
$(pData, fonction (clé, innerjson) {} .each)
$(set_list) .append ($("< option >', {})
value: innerjson. VALUE,
text: innerjson.NAME
}))
If (innerjson. SELECTED! = ") {selected_val = innerjson. SELECTED};
});
If (selected_val! = ") {}
$('select'_+_set_list_+_'_option').each (function)
{this.selected = (this.text == selected_val) ;})} ;
}
},
}
);
Is it possible that our internal environment lacks some features used in code? How can I check to see if we have a missing function? There are other reasons that the two environments react differently?
Any help would be appreciated.
Thank you
PAM Zaske
City of Arvada
Arvada, Colorado
Hello
DBA should copy all images and static files to install image file zip to the web server.
And of course old files need to be replaced.
What web server you are using?
Browser of witch you use when you test?
When you test check browser console if there are JavaScript errors.
Kind regards
Jari
-
In cascade LOV - Dynamic action time-out
See https://apex.oracle.com/pls/apex/f?p=57688:32
X 1 selection list is set 1,2,3
X 2 a parent selection list cascading as X 1 and ajoute.1/.2/.3 to X 1
There is a change DA on the text field to set the 2 selection lists to the value set in the text field. For example, if I set the text field to the 1.2 version, I want X 1 to 1.2 to 1 and X 2. There are therefore 2 actions to set the value; first of all to define X 1 and secondly to set X 2.
The problem is that when X 1 is set, the change event on X 1 fires and refreshes the LOV for X 2 and the 2nd real action should fire after the LOV refresh but (probably), it fires too early and not ends not change the value of X 2, so it remains empty. I tried assigning no on the first real action to remove a change event, but that will not work because I need the modification to the fire action when X 1 changes to the LOV to X 2 can be updated.
The annoying thing about this is that it works sometimes (X 2 is set correctly) and sometimes does not (X 2 remains empty). I guess it depends on timing of millisecond level between when X 2 refresh is complete and the 2nd shot of real action.
What this kind of thing done? Almost need a sleep/delay after the first action to set the value so that the change/refresh LOV event to take place and then run the action to set the value to 2. But the presentation with the help of setTimeout and similar delays can ruin the execution has / synchronous Javascript engine and crash the browser so I am reluctant to go this route...
Help? Thank you
Select cascading lists work correctly with the principle of cooling they are triggered in the front and after the events of refreshment. You can link to this event, and then set the value.
Your first action is a defined value which is synchronous and triggers a change event.
Here is a pure js to take on this:
$("#P32_X1").on("change", function(){ // do something when X1 is changed console.log("change x1"); //wait for X2 to finish refreshing before setting its value //.one() will bind a handler which will unbind after it hass handled once $("#P32_X2").one("apexafterrefresh",function(){ apex.item("P32_X2").setValue("1.1"); }); }); //when text changes and set a value on X1 //setValue already fires a change event $("#P32_TEXT").change(function(){ apex.item("P32_X1").setValue("1"); .change(); });
To do this in your DA, you bind the time Manager to the second list before leaving the event which it will update. I would not put it in a DA on X 1 because this event of change may occur when it is too late already (may, may not - asynchronism), simply because there is already a change on it due to cascading select lists event handler. So ideally, before you trigger the change on X 1 event and, therefore, during the change of Manager of the TEXT.
$("#P32_X2").one("apexafterrefresh",function(){ apex.item("P32_X2").setValue("1.1"); });
You will need to define what is set as the value of X 2 of course, that you have given, I can't tell what it is, so I've hardcoded value (and FYI my value will work only if X 1 made 1, of course, because only then be X 2 hold 1.1).
Some links to docs:
-
Set the values in cascade LOV (Skillbuilders SuperLOV used)
Hello
I install a simple page with a SuperLOV cascading.
I'm trying to set the values of the first and the second SuperLOV based on the selection of a report.
After the selection, a javascript function is called that sets the variable state and browser session P1_EMPNO
function editRecord(pValue) { //set session state of P1_EMPNO to use in pl/sql query var a=new htmldb_Get(); a.add('P1_EMPNO', pValue); var r=a.get(); //set variable to trigger dynamic action $s('P1_EMPNO',pValue); }
I use this point (P1_ITEM) to trigger a dynamic Action (when the value changes AND is not null) to SET the VALUE for the first LOV. This method works.
Then one created a second dynamic Action that uses the event AFTER REFRESH for the first LOV to SET the VALUE for the second SuperLOV. It does not work
Just to test the logic, I created a third standard LOV which is the same as the second SuperLOV and respective dynamic action. This one works.
It's the http://apex.oracle.com/pls/apex/f?p=49044:1 application
(PATRICK, demoadmin, 1234) application WORDERS.
I would be very grateful for any help
Thank you.
OK, I discovered what was going on.
I used a $('#P1_EMP').apex_super_lov of javascript for dynamic Action action to set the value of the SuperLOV.
-
Rounding time - doubling output results
I hope someone can take a look at my request and easily tell me why he multiplies the results in my DURATION_MIN_AM column. It seems to be evolving date stamps / hour that I need (rounded up to the nearest 30 minutes). Is there something easily identifiable in my application that I don't see? I've been watching him for a while now and its not obvious to me at all...
WITH got_period_num
AS (SELECT
FLOOR ((stop_ts-DATE ' 2014-01-01') * 24 * 2) AS period_num,
DURATION_MIN_AM,
B.EXCEPTION_DS,
c.MU_ID,
start_ts,
stop_ts
Of
LIGHTHOUSE. IEX_AGT_ACT_DETAIL HAS
JOIN THE LIGHTHOUSE. IEX_EXCEPTION_DIM B
ON A.EXCEPTION_KEY = B.EXCEPTION_KEY
JOIN the left HEADLIGHT. IEX_AGT_ADHERENCE_ATTR C ON A.EMP_KEY = C.EMP_KEY - modified knuckles
WHERE
A.ACTIVITY_DT BETWEEN TO_DATE)
January 24, 2014 00:00:00 ',
"MM/DD/YYYY hh24:mi:ss")
AND TO_DATE)
January 24, 2014 00:00:00 ',
"MM/DD/YYYY hh24:mi:ss") AND
C.ACTIVITY_DT BETWEEN TO_DATE (24 JANUARY 2014 00:00:00 ',)
"MM/DD/YYYY hh24:mi:ss")
AND TO_DATE (24 JANUARY 2014 00:00:00 ',)
"MM/DD/YYYY hh24:mi:ss") AND
c.MU_ID IN
('220'))
SELECT
TO_CHAR)
DATE ' 2014-01-01' + (period_num / (24 * 2));
"FMMM/JJ/AAAA HH:fmMI:SS AM")
AS start_ts,
TO_CHAR)
DATE ' 2014-01-01' + ((period_num + 1) / (24 * 2));
"FMMM/JJ/AAAA HH:fmMI:SS AM")
AS stop_ts,
SUM (DURATION_MIN_AM) AS DURATION_MIN_AM,
EXCEPTION_DS,
MU_ID
Of
got_period_num
GROUP BY
period_num,
EXCEPTION_DS,
MU_ID
ORDER BY
start_ts
CREATE TABLE LIGHTHOUSE. () IEX_ACT_DETAIL
NUMBER OF EMP_KEY
NUMBER OF EXCEPTION_KEYACTIVITY_DT
VARCHAR2 (5)
START_TS VARCHAR2 (5).
STOP_TS VARCHAR2 (5).
NUMBER OF DURATION_MIN_AM)CREATE TABLE LIGHTHOUSE. () IEX_EXCEPTION_DIM
EXCEPTION_DS VARCHAR2 (100),
NUMBER OF EXCEPTION_KEY)CREATE TABLE LIGHTHOUSE. () IEX_AGT_ADHERENCE_ATTR
NUMBER OF MU_ID
NUMBER OF EMP_KEY)
INSERT IN THE LIGHTHOUSE. IEX_AGT_ACT_DETAIL (EMP_KEY, EXCEPTION_KEY, ACTIVITY_DT, START_ST, STOP_TS, DURATION_MIN_AM) VALUES (886, 000, ' 03 /' 02/2014, 3/2/2014 11:24 ', ' 03/02/2014 11:30 ', 6)
INSERT IN THE LIGHTHOUSE. IEX_AGT_ACT_DETAIL (EMP_KEY, EXCEPTION_KEY, ACTIVITY_DT, START_ST, STOP_TS, DURATION_MIN_AM) VALUES (886, 000, ' 03 /' 02/2014, 3/2/2014 11:27 ', 03/02/2014 11:31 ', 4)
INSERT IN THE LIGHTHOUSE. IEX_AGT_ACT_DETAIL (EMP_KEY, EXCEPTION_KEY, ACTIVITY_DT, START_ST, STOP_TS, DURATION_MIN_AM) VALUES (886, 000,' 03 /' 02/2014, 3/2/2014 10:02 ', 03/02/2014 10:17 ', 15)
INSERT IN THE LIGHTHOUSE. IEX_AGT_ACT_DETAIL (EMP_KEY, EXCEPTION_KEY, ACTIVITY_DT, START_ST, STOP_TS, DURATION_MIN_AM) VALUES (886, 001, ' 03 /' 02/2014, 3/2/2014 23:24 ', 03/02/2014 23:38 ', 4)
INSERT IN THE LIGHTHOUSE. IEX_AGT_ACT_DETAIL (EMP_KEY, EXCEPTION_KEY, ACTIVITY_DT, START_ST, STOP_TS, DURATION_MIN_AM) VALUES (886, 001, ' 03 /' 02/2014, 3/2/2014 21:24 ', 03/02/2014 21:38 ', 14)
INSERT IN THE LIGHTHOUSE. IEX_EXCEPTION_DIM (EXCEPTION_DS, EXCEPTION_KEY) VALUES (' 6', 000)
INSERT IN THE LIGHTHOUSE. IEX_EXCEPTION_DIM (EXCEPTION_DS, EXCEPTION_KEY) VALUES ('OPEN', 001)
INSERT IN THE LIGHTHOUSE. IEX_AGT_ADHERENCE_ATTR (MU_ID, EMP_KEY) VALUES (220, 886)START_TS STOP_DS DURATION_MIN_AM EXCEPTION_DS MU_ID
03/02/2014 11:00 03/02/2014 11:30 10 TO THE 6 220
03/02/2014-10:00 03/02/2014-15 10:30 6 220
03/02/2014 23:00 03/02/2014 23:30 4 220 OPEN
03/02/2014 21:00 03/02/2014 21:30 14 OPEN 220Hello
I don't know the query you posted is relevant to this problem.
It seems that this query is designed for a 1-to-many relationship between the lines in
iex_agt_detail and buckets, in other words, each line blongs to exactly 1 bucket Apaprantly, in this problem, the relationship is much to may, in other words, a single line of the table may be part of several compartments.
He gets the desired results according to the given sample data:
WITH date_range AS
(
SELECT TO_DATE (3 February 2014 00:00 '-the first time to include)
, "MM/DD/YYYY HH24.
) AS first_dt
, TO_DATE (5 February 2014 00:00 '-first time to exclude)
, "MM/DD/YYYY HH24.
) AS last_dt
OF the double
)
all_periods AS
(
SELECT first_dt + ((LEVEL - 1)
/ (24 * 2)
) AS this_start_dt
first_dt + (LEVEL
/ (24 * 2)
) AS next_start_dt
OF date_range
CONNECT BY LEVEL<= (last_dt="" -="" first_dt)="" *="" 24="" *="">=>
)
SELECT aaa.mu_id
TO_CHAR (ap.this_start_dt
, "FMMM/JJ/AAAA fmHH:MI AM.
) AS start_ts
TO_CHAR (ap.next_start_dt
, "FMMM/JJ/AAAA fmHH:MI AM.
) AS stop_ts
ed.exception_ds
, ad.duration_min_am - or SUM (...) if necessary
* LESS (ad.stop_ts (ap.next_start_dt)
-Most GREAT (ad.start_ts, ap.this_start_dt)
)
/ (ad.stop_ts
-ad.start_ts
) AS duartion_min_am
Of all_periods ap
JOIN iex_agt_detail ad WE ad.start_ts< ap.next_start_dt="">
AND ad.stop_ts > ap.this_start_dt
AND ad.activity_dt = TRUNC (ap.this_start_dt) - if necessary
JOIN iex_agt_adherence_attr aaa ON aaa.emp_key = ad.emp_key - or LEFT OUTER JOIN, if necessary
JOIN iex_exception_dim ON ed.exception_key = ad.exception_key ed
WHERE aaa.mu_id IN (220)
-GROUP BY--if necessary
ORDER BY ed.exception_ds
;
I guess just to many of your needs. For example, it is unclear if you need a GROUP BY; It looks like all the ranks of the production comes from only 1 rank of iex_agt_detail (and other tables to which it is attached). Simply GROUP IN if an output line can be 2 or more rows in the table.
This solution starts by creating a "picture" of all possible buckets: all_periods contains 1 row for each half-hour period which can be a defined result. (Since it is inner join to iex_agt_detail thereafter, only buckets that actually have some data are included in the final output).
-
In cascade LOV - Dungeon existing value
Stop LOV cascading to reset the values and keep the existing selected options VALID if
Please take a look at the scenario
When the value of Col - 1 is that the LOV of Col - 2A AA BB CC and Col - 3 a 1 2 3 valuesCol-1 Col-2 Col-3 A AA 1 A BB 2 A CC 3 B AA 1 B AAB 2 B AAV 3
and if the value of Col - 2 B the LOV of Col - 2 a AA AAB AAV and Col - 3 a 1 2 3 values
What is going on:
"When the user changes the Col-1 from A to B Col - 2 & Col - 3 resets the selected user value (I think the default behavior)
What is needed if the user has selected "3" in the collar-3 and modifies the Col-1 from A to B Col - 2 & Col-3 should have selected user values VALID IFThis example shows how to do this:
https://Apex.Oracle.com/pls/Apex/f?p=31517:292
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Apress.com/9781430235125
http://Apex.Oracle.com/pls/Apex/f?p=31517:1
http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
-------------------------------------------------------------------
Maybe you are looking for
-
Satellite don't wake up from sleep or hibernation when the lid is closed
It is a problem that I had with my laptop from the outset - if the laptop is in sleep or Hibernate mode and the lid is closed, or the lid is closed and will switch "standby" from there, it won't wake up or respond to the switch once again opened. Eve
-
Advpack.dll error when you try to install the software
When you try to install new software I get the following error: "error creating process . "Reason: C:\WINDOWS\system32\advpack.dll ' any idea how to deal with this problem? XP Pro SP3.
-
EA6500 will not get the rental
Small business, under 10 computers, printers Wi-wired and wireless, simple network. Don't no need (nor yours especially) Smart Wi - Fi, Cloud Connect, or or anything other than a simple router configuration manually. Have a new EA6500 I intend to use
-
HP 15-R030na: computer laptop and portable
What is the difference between a notebook and a laptop? I have a HP15-r030na, which is classified as a laptop computer, so what then a laptop would it look like?
-
Video card (and others) upgrades for a HP Pavilion Elite HPE-510 t
Hello... First of all, I just want to say that these forums have been an invaluable resource for me in my quest to upgrade my current PC. A lot of good answers and always at the top of the Google search results, you guys have been so super helpful. W