Can I add start and end dates to flex in WCS assets?
Hi all
I have to add the start and end dates to my flex belt and make it visible on the plus edition + inspect mode. For the Fund, it is STANDARD, but I have an obligation to do so for other assets that is not active promotion.
Is there any doc/blog I can do? Help, please.
Hi Avi.
Dates of start and end standards are OOTB field in the metadata of the asset. So they you must set the cs.sitepreview property in the file futuretense.ini in the 'management '.
CS.sitepreview = ContentManagement
You can check out the documentation for more details about this property: futuretense.ini - 11 g Release 1 (11.1.1.8.0)
If you need something different, maybe you need create your own attributes Start Date and end using types date: Data Design: active models - 11 g Release 1 (11.1.1.8.0)
Kind regards
Raul.
Tags: Fusion Middleware
Similar Questions
-
Primavera P6 API - start and end dates of the activity in the secondary reference scenario
How to seek early and dates of activity in the secondary database or tertiary reference end? There are areas of activities and methods provided in planning extraction and primary base line project (active class getBaseline1StartDate(), getBaseline1FinishDate) but can't find any secondary data or tertiary basis even if we show them in details the activity in the Primavera. I use Primavera integration API version 8.2.
Use the BaselineProjectHelper class to get a list of all the base lines for a given project. Go through the list looking for basic lines you are interested in.
Once you have basic interest projects, pull a list of ongoing project activities.
Browse the list of activities tearing you start and end dates.
Call the method on each of you loadBaselineActivity of reference projects for the departure of the referenced activity and end dates.
For performance, seek assistance loadBaselineActivities to reduce database queries.
V/r,
Gene
-
Find records overlapping start and end dates
Hi all
I have a table with begin and end date columns. I need to find the records that overlap with a few values in corresponding column.
Table: MG_AUTH_AGNT
-----
ID
MGATH_clnt
MGATH_beg_DT
MGATH_END_DT
MGATH_SERV_GRP
MGATH_STAT
MGATH_TYP
MGATH_NHIC_ERR_CD
-----
I need to find records containing dates that overlap.
Examples of data
-----
If the customer has two records with the same MGATH_SERV_GRP, MGATH_STAT, MGATH_TYP and start and end dates of the first disc are 01/JAN/2009 AND 01 / JAN / 2009.
start and end dates of second record are 15/JAN/2009 and 15/FEB/2009.
Here are the dates overlap. with my select query, I should get these two recordings.
I am using the following query. But it is too slow. Could you please suggest a better sql?
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Select MG_AUTH_AGNT m, MGATH_clnt, MGATH_beg_DT, MGATH_END_DT, MGATH_NHIC_ERR_CD, id where m.MGATH_SERV_GRP = '1' and m.MGATH_STAT = 'A' and MGATH_clnt = (select distinct MGATH_clnt of MG_AUTH_AGNT d where d.MGATH_SERV_GRP = m.MGATH_SERV_GRP and d.MGATH_TYP = m.MGATH_TYP and m.MGATH_CLNT = d.MGATH_CLNT and d.MGATH_STAT = m.MGATH_STAT and m.idd.id ((trunc (m.MGATH_beg_DT) & gt; = trunc (d.MGATH_beg_DT) and trunc (m.MGATH_beg_DT) & lt;=trunc(d.MGATH_END_DT)) or (trunc (m.MGATH_END_DT) & gt; = trunc (d.MGATH_beg_DT) and trunc (m.MGATH_END_DT) & lt; = trunc (d.MGATH_END_DT)) or (trunc (m.MGATH_beg_DT) & lt; = trunc (d.MGATH_beg_DT) and trunc (m.MGATH_END_DT) & gt; = trunc (d.MGATH_END_DT))) MGATH_clnt order MGATH_beg_DT
Published by: user10727414 on March 17, 2009 01:36user10727414 wrote:
My data is correctMGSRV_CLNT = MGSRV_BEG_DT = MGSRV_END_DT
501184242 = 28-AUG-07 = 31-DEC-9999
501184242 = 28-AUG-07 = 31-DEC-9999
501184242 = 20-DEC-07 = 31-DEC-9999
501184242 = 20-DEC-07 = 31-DEC-9999And we had to guess that a year of "99" was in fact "9999" were we? Hang on I'll go and dust off my crystal ball.
Well, now we know the correct dates (?), we'll put that in the original request...
SQL> ed Wrote file afiedt.buf 1 with mypeople as 2 (select 501184242 as id, to_date('28-AUG-2007','DD-MON-YYYY') as stdt, to_date('31-DEC-9999','DD-MON-YYYY') as endt from dual union all 3 select 501184242, to_date('28-AUG-2007','DD-MON-YYYY'), to_date('31-DEC-9999','DD-MON-YYYY') from dual union all 4 select 501184242, to_date('20-DEC-2007','DD-MON-YYYY'), to_date('31-DEC-9999','DD-MON-YYYY') from dual union all 5 select 501184242, to_date('20-DEC-2007','DD-MON-YYYY'), to_date('31-DEC-9999','DD-MON-YYYY') from dual union all 6 select 2, to_date('19/01/2009','DD/MM/YYYY'), to_date('24/01/2009','DD/MM/YYYY') from dual) 7 -- END OF TEST DATA 8 select id, stdt, endt 9 ,case when lead(stdt) over (partition by id order by stdt,endt) <= endt 10 or lag(endt) over (partition by id order by stdt,endt) >= stdt then 'Overlap' 11 else 'Ok' 12 end as status 13 from mypeople 14* order by id, stdt, endt SQL> / ID STDT ENDT STATUS ---------- --------- --------- ------- 2 19-JAN-09 24-JAN-09 Ok 501184242 28-AUG-07 31-DEC-99 Overlap 501184242 28-AUG-07 31-DEC-99 Overlap 501184242 20-DEC-07 31-DEC-99 Overlap 501184242 20-DEC-07 31-DEC-99 Overlap SQL>
Looks like it works for me.
If it does not work for you then maybe had better give us a statement of create table and insert to your data in the example statements then we can see what you're trying to do.
-
Calculate the start and end date in Connect By - during Hirerchy changes
/ * Formatted 05/20/2013 09:53 (PS5 v5.115.810.9015) * /.
Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
Hello, can you please help me or guide me in the calculation of the dates of beginning and end to the underside of logic
I want to calculate the Hirerchy Manager to the Agent.
Then under query works fine and its giving me the expected results
But when there is a change in the Hirerchy Manager or manager gets promoted
Then I need to calculate the start date and end date.
CREATE TABLE PERSON_DTL ( SID VARCHAR2(10 BYTE), EMP_MGRS_ID VARCHAR2(10 BYTE), START_EFFECTIVE_DT DATE, END_EFFECTIVE_DT DATE ); Insert into PERSON_DTL (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT) Values ('M100', 'M107', TO_DATE('05/20/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into PERSON_DTL (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT) Values ('M101', 'M102', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/18/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into PERSON_DTL (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT) Values ('A100', 'M100', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into PERSON_DTL (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT) Values ('M100', 'M101', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/18/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into PERSON_DTL (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT) Values ('M107', 'M102', TO_DATE('05/20/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into PERSON_DTL (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT) Values ('M102', 'M103', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into PERSON_DTL (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT) Values ('M103', 'M104', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into PERSON_DTL (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT) Values ('A101', 'M105', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into PERSON_DTL (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT) Values ('M105', 'M106', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); COMMIT;
SELECT CONNECT_BY_ROOT (b.sid) agent_sid, TRIM ( LEADING ',' FROM SYS_CONNECT_BY_PATH (b.sid, ',') || ',' || b.emp_mgrs_id ) PATH, START_EFFECTIVE_DT Start_dt, END_EFFECTIVE_DT End_dt FROM PERSON_DTL b WHERE CONNECT_BY_ISLEAF = 1 START WITH sid IN ('A101', 'A100') CONNECT BY PRIOR b.emp_mgrs_id = b.sid
This is the results that i am getting now. AGENT_SID PATH START_DT END_DT A100 A100,M100,M101,M102,M103,M104 1/1/2010 12/31/9999 A100 A100,M100,M107,M102,M103,M104 1/1/2010 12/31/9999 A101 A101,M105,M106 1/1/2010 12/31/9999
Results Required A100 A100,M100,M101,M102,M103,M104 1/1/2010 5/18/2013 A100 A100,M100,M107,M102,M103,M104 5/20/2013 12/31/9999 A101 A101,M105,M106 1/1/2010 12/31/9999
WITH the CLAUSE will make it readable
SQL> with paths as 2 ( 3 SELECT CONNECT_BY_ROOT (b.sid) agent_sid, 4 TRIM ( 5 LEADING ',' FROM SYS_CONNECT_BY_PATH (b.sid, ',') 6 || ',' 7 || b.emp_mgrs_id 8 ) 9 PATH, 10 START_EFFECTIVE_DT Start_dt, 11 END_EFFECTIVE_DT End_dt,rownum rn 12 FROM PERSON_DTL b 13 START WITH sid IN ('A101', 'A100') 14 CONNECT BY PRIOR b.emp_mgrs_id = b.sid 15 ), 16 flagged as 17 ( 18 select agent_sid, 19 path, 20 start_dt, 21 end_dt,rn, 22 case when path like lag(path) over(order by rn)||'%' then 0 else 1 end flg 23 from paths 24 ), 25 summed as 26 ( 27 select agent_sid,path,start_dt,end_dt, 28 sum(flg) over(order by rn) sm 29 from flagged 30 ) 31 select agent_sid,max(path) path,max(start_dt) start_dt, 32 min(end_dt) end_dt 33 from summed 34 group by agent_sid,sm 35 order by agent_sid; AGENT_SID PATH START_DT END_DT ---------- ---------------------------------------- --------- --------- A100 A100,M100,M101,M102,M103,M104 01-JAN-10 18-MAY-13 A100 A100,M100,M107,M102,M103,M104 20-MAY-13 31-DEC-99 A101 A101,M105,M106 01-JAN-10 31-DEC-99
-
Simple validation on the start and end dates
Apex 4.2
I'm trying to create a script of validation on my start date and end date. A simple validation indicating the start date must be less than the end date. Because apex deals my fields of date as a string, using an expression of pl/sql as P101_START_DATE < = P101_END_DATE does not work. This may seem like an easy question, but I'm unable to create this simple validation. Any help would be greatly appreciated. Thanks in advance!
Take a look how the TO_DATE plsql function works... ie... to_date(:P101_START_DATE,'mm-DD-yyyy')<=to_date(:P101_END_DATE,'mm-dd-yyyy'),>=to_date(:P101_END_DATE,'mm-dd-yyyy'),>
-
Start and end date of week 1-5 a month
I wanted to print the date of beginning and end of the week for a given month. If the month last_week overlaps the next month, I don't want to print the week5. If the week5 overlap with next month, then it must be printed.
SELECT
TRUNC (to_date(:P_DATE,'MM/DD/YYYY'), 'IW') 'SW1', / * start of week 1 * /.
TRUNC (TO_DATE (: P_DATE, "MM/DD/YYYY '") + 6, 'IW')-1 'EW1', / * end of week you 1 * /.
NEXT_DAY (trunc (to_date(:P_DATE,'MM/DD/YYYY'), 'IW'), 'Monday') 'SW2 '.
NEXT_DAY (TRUNC (TO_DATE (: P_DATE, "MM/DD/YYYY") + 6, 'IW'), 'Sunday') 'EW2. "
NEXT_DAY (NEXT_DAY (trunc (to_date(:P_DATE,'MM/DD/YYYY'), 'IW'), 'Monday'), 'Monday') "SW3."
NEXT_DAY (NEXT_DAY (TRUNC (TO_DATE (: P_DATE, "MM/DD/YYYY") + 6, 'IW'), 'Sunday'), 'Sunday') 'EW3. "
NEXT_DAY (NEXT_DAY (NEXT_DAY (trunc (to_date(:P_DATE,'MM/DD/YYYY'), 'IW'), 'Monday'), 'Monday'), 'Monday') "SW4".
NEXT_DAY (NEXT_DAY (NEXT_DAY (TRUNC (TO_DATE (: P_DATE, "MM/DD/YYYY") + 6, 'IW'), 'Sunday'), 'Sunday'), 'Sunday') 'EW4. "
NEXT_DAY (NEXT_DAY (NEXT_DAY (NEXT_DAY (trunc (to_date(:P_DATE,'MM/DD/YYYY'), 'IW'), 'Monday'), 'Monday'), 'Monday'), 'Monday') 'SW5. "
NEXT_DAY (NEXT_DAY (NEXT_DAY (NEXT_DAY (TRUNC (TO_DATE (: P_DATE, "MM/DD/YYYY") + 6, 'IW'), 'Sunday'), 'Sunday'), 'Sunday'), 'Sunday') 'EW5.
FROM DUAL;
SW1 EW1 SW2 EW2 SW3 EW3 SW4 EW4 SW5 EW5 29/12/2014 04/01/2015 05/01/2015 11/01/2015 12/01/2015 18/01/2015 19/01/2015 25/01/2015 26/01/2015 01/02/2015 Is it possible to get it without using the next_day() several times for each week and to limit the accumulation of the week last in a month.
Check my last answer. And if this isn't what you need, then the expected results for each month in 2015.
SY.
-
OK I'm lost and sought and made changes to what I do, but not sure I correct datasets or written something wrong.
I have two date fields in my form. A Start Date and an end Date
I put a validation that indicates the Start Date/time cannot be greater than the end Date/time or so I think that's what he said. But if I put and a date in the form of an hour after the beginning of end date, it throws the error
Here are my details and maybe I'm just storing data wrong or something
Validation ENDDATE: PL/SQL error:
If to_date(:P6_DTGSTART) > to_date(:P6_DTGEND)
raise_application_error (-20001, 'End Date must be greater than the Start Date.');
end if;
When I look at the data stored in the database SQL Workshop, this is what I see
DTGSTART 11-29-2010
DTGEND
The entry in the form is a DatePicker to the format: DD-MON-YYYY HH24
If the entry as well as:
Start date/time November 29, 2010 09:25
End date/time November 29, 2010 10:25
The end date may be on the same date, but time must be greater than the start date/time
Thank you
WallyCheck it out now...
Thank you
Machaan -
Hello
I have an obligation to make the fiscal quarters following the date of beginning and end given.
For example if I have
start date: 1 January 09
end date: 31 December 09
I divide it into 4 quarters as below:
T1: 1 January 09-31 March 09
Qtr2: 1 April 09-30 June 09
Qtr3: 1 July 09-30 September 09
Qtr4: 1st October 09-31 December 09
Help, please.
Kind regards
FahimHello
SQL> SELECT ADD_MONTHS(to_date('01-JAN-2008','DD-MON-YYYY'),(ROWNUM-1)*3) start_dt,(ADD_MONTHS(to_date('01-JAN-2008','DD-MON-YYYY'),ROWNUM*3))-1 End_Date 2 FROM DUAL 3 CONNECT BY ADD_MONTHS(to_date('01-JAN-2008','DD-MON-YYYY'),(LEVEL-1)*3) <=to_date('30-SEP-2009','DD-MON-YYYY'); START_DT END_DATE --------- --------- 01-JAN-08 31-MAR-08 01-APR-08 30-JUN-08 01-JUL-08 30-SEP-08 01-OCT-08 31-DEC-08 01-JAN-09 31-MAR-09 01-APR-09 30-JUN-09 01-JUL-09 30-SEP-09 7 rows selected. SQL>
See you soon,.
-
Alternate greeting - start and end date
We have 8.6 connection of the unit. I know alternate greetings may have end dates, but our users also want the start dates. Is this possible? I have not seen it mentioned anywhere, but I thought I would check before giving up on this subject.
Unfortunately not.
Chris
-
Get start and end date of week by month and year
How I need the week is here - a week always begins on a Sunday so from February, it will be
begin the week of end of week
12-02-1 02/12/04
02/12/05 02/12/11
02/12/12-02/12/18
02/12/19 02/12/25
02/12/26-29/12/29
So, because the first week does not start on a Sunday he's leaving
1 (Wednesday) to 4th (saturday) just like a calendar.
Thanks in advance
If far from Solomons help I have this
This is for January
WITH t AS)
SELECT TRUNC (TRUNC (to_date('01-01-12','MM-DD-YY'), 'YYYY')-1, 'W') + (LEVEL-1) * 7 week_start_date
OF THE DOUBLE
CONNECT BY LEVEL < = 53
)
SELECT week_start_date,
LEAST (LAST_DAY (to_date('01-01-12','MM-DD-YY')), week_start_date + 6) week_end_date
T
WHERE week_start_date > = TRUNC (to_date('01-01-12','MM-DD-YY'), 'MM')
AND week_start_date < ADD_MONTHS (TRUNC (to_date('01-01-12','MM-DD-YY'), 'MM'), 1)
begin the week of end of week
01/12/02-01/12/08
12/01/09-01/12/15
12/01/16-01/12/22
01/12/23-01/12/29
01/12/30-01/12/31If satrts Sunday of the week:
WITH t AS ( SELECT TRUNC(TRUNC(&dt,'MM') + 1,'IW') - 1 + (LEVEL - 1) * 7 week_start_date FROM DUAL CONNECT BY TRUNC(TRUNC(&dt,'MM') + 1,'IW') - 1 + (LEVEL - 1) * 7 <= LAST_DAY(&dt) ) SELECT GREATEST(week_start_date,TRUNC(&dt,'MM')) week_start_date, LEAST(LAST_DAY(&dt),week_start_date + 6) week_end_date FROM t WHERE week_start_date <= LAST_DAY(&dt) /
For example:
SQL> SET VERIFY OFF SQL> DEFINE dt="DATE '2012-01-17'" -- January SQL> WITH t AS ( 2 SELECT TRUNC(TRUNC(&dt,'MM') + 1,'IW') - 1 + (LEVEL - 1) * 7 week_start_date 3 FROM DUAL 4 CONNECT BY TRUNC(TRUNC(&dt,'MM') + 1,'IW') - 1 + (LEVEL - 1) * 7 <= LAST_DAY(&dt) 5 ) 6 SELECT GREATEST(week_start_date,TRUNC(&dt,'MM')) week_start_date, 7 LEAST(LAST_DAY(&dt),week_start_date + 6) week_end_date 8 FROM t 9 WHERE week_start_date <= LAST_DAY(&dt) 10 / WEEK_STAR WEEK_END_ --------- --------- 01-JAN-12 07-JAN-12 08-JAN-12 14-JAN-12 15-JAN-12 21-JAN-12 22-JAN-12 28-JAN-12 29-JAN-12 31-JAN-12 SQL> SET VERIFY OFF SQL> DEFINE dt="DATE '2012-02-25'" -- February SQL> WITH t AS ( 2 SELECT TRUNC(TRUNC(&dt,'MM') + 1,'IW') - 1 + (LEVEL - 1) * 7 week_start_date 3 FROM DUAL 4 CONNECT BY TRUNC(TRUNC(&dt,'MM') + 1,'IW') - 1 + (LEVEL - 1) * 7 <= LAST_DAY(&dt) 5 ) 6 SELECT GREATEST(week_start_date,TRUNC(&dt,'MM')) week_start_date, 7 LEAST(LAST_DAY(&dt),week_start_date + 6) week_end_date 8 FROM t 9 WHERE week_start_date <= LAST_DAY(&dt) 10 / WEEK_STAR WEEK_END_ --------- --------- 01-FEB-12 04-FEB-12 05-FEB-12 11-FEB-12 12-FEB-12 18-FEB-12 19-FEB-12 25-FEB-12 26-FEB-12 29-FEB-12 SQL> SET VERIFY OFF SQL> DEFINE dt="DATE '2012-03-07'" -- March SQL> WITH t AS ( 2 SELECT TRUNC(TRUNC(&dt,'MM') + 1,'IW') - 1 + (LEVEL - 1) * 7 week_start_date 3 FROM DUAL 4 CONNECT BY TRUNC(TRUNC(&dt,'MM') + 1,'IW') - 1 + (LEVEL - 1) * 7 <= LAST_DAY(&dt) 5 ) 6 SELECT GREATEST(week_start_date,TRUNC(&dt,'MM')) week_start_date, 7 LEAST(LAST_DAY(&dt),week_start_date + 6) week_end_date 8 FROM t 9 WHERE week_start_date <= LAST_DAY(&dt) 10 / WEEK_STAR WEEK_END_ --------- --------- 01-MAR-12 03-MAR-12 04-MAR-12 10-MAR-12 11-MAR-12 17-MAR-12 18-MAR-12 24-MAR-12 25-MAR-12 31-MAR-12 SQL>
SY.
Published by: Solomon Yakobson, January 12, 2012 13:19
-
Search based on the start date and end date
Hello
I added two fields "Start Date" and "End Date" on a search page.
I did the VO extension also.
Now, I have to implement the logic of the search to get all records created between' start' and 'End Date' after pressing the "GO" button on this page.
Can someone please provide advice to extend the controller.
Thanks in advance.
Gaurav.I think that the path would be
Import oracle.apps.per.common.webui.PerTransactionTopCOImpl;
Thank you
-Anil
http://oracleanil.blogspot.com/ -
"When I import the xls file its start and finish dates to date of data change.
I'm using Primavera p6 v7 autonomous, I export project in excel sheet and I put my activities with start and end dates it. When I import this sheet in primavera the start and finish dates change to date of data...
Can someone guide me and suggest me what should I do to solve this problem...You insert the logic successor/predecessor for these activities. What, exactly, are these activities? If you want an activity at the start/finish on a specific date, you can always use a constraint.
-
Hello people:
I have currently a query that picks up all the weeks between a date range where my week starts on Thursday and ends on Wednesday. The following query works fine except that I need the week of beginning and end, from beginning and end Dates of months and the beginning and the Dates of end of the values of the settings, I'm passing. In this case, I chose January 1, 2013 to 31 December 2013.
Any help or pointers would be great!
Thank you!
Problem: I am picking up days of December 2012 as the first week began on December 27, 2012. In addition, in December, I'm pretty much lost last week as well (26 December - 31 December).
The request in hand:
SELECT first_thursday + (7 * (LEVEL - 1)) AS week_start_date, first_thursday + (7 * LEVEL) - 1 AS week_end_date FROM ( SELECT TRUNC(p_from_date + 4, 'IW') - 4 AS first_thursday, -- Week should start the pre ceeding THURSDAY based on the Start Date TRUNC( p_to_date + 4, 'IW') - 5 AS last_wednesday FROM ( SELECT to_date('01-JAN-2013') AS p_from_date, NVL(to_date('31-DEC-2013'), SYSDATE) AS p_to_date FROM dual ) parms ) end_points CONNECT BY LEVEL <= ( last_wednesday + 1 - first_thursday)/7;
Currently, this is the result I get (I'm only including the months of January and December here).
Week_Start_Date Week_End_Date 27-DEC-12 02-JAN-13 03-JAN-13 09-JAN-13 10-JAN-13 16-JAN-13 17-JAN-13 23-JAN-13 24-JAN-13 30-JAN-13 31-JAN-13 06-FEB-13
December:
28-NOV-13 04-DEC-13 05-DEC-13 11-DEC-13 12-DEC-13 18-DEC-13 19-DEC-13 25-DEC-13
What I would really like is based on start and end Dates, as well as the first and the last day of the month is similarly try nicely. I have provided and then gently break at the end of the month:
January:
01-JAN-13 02-JAN-13 03-JAN-13 09-JAN-13 10-JAN-13 16-JAN-13 17-JAN-13 23-JAN-13 24-JAN-13 30-JAN-13 31-JAN-13 31-JAN-13
February:
01-FEB-13 06-FEB-13 07-FEB-13 13-FEB-13 14-FEB-13 20-FEB-13 21-FEB-13 27-FEB-13 28-FEB-13 28-FEB-13
November:
31-OCT-13 06-NOV-13 07-NOV-13 13-NOV-13 14-NOV-13 20-NOV-13 21-NOV-13 27-NOV-13 28-NOV-13 04-DEC-13
December:
01-DEC-13 04-DEC-13 05-DEC-13 11-DEC-13 12-DEC-13 18-DEC-13 19-DEC-13 25-DEC-13 26-DEC-13 31-DEC-13
Hello
Roxyrollers wrote:
Hello people:
I have currently a query that picks up all the weeks between a date range where my week starts on Thursday and ends on Wednesday. The following query works fine except that I need the week of beginning and end, from beginning and end Dates of months and the beginning and the Dates of end of the values of the settings, I'm passing. In this case, I chose January 1, 2013 to 31 December 2013.
Any help or pointers would be great!
Thank you!
Problem: I am picking up days of December 2012 as the first week began on December 27, 2012. In addition, in December, I'm pretty much lost last week as well (26 December - 31 December).
The request in hand:
- First_thursday SELECT + (7 * (LEVEL - 1)) AS week_start_date,
- first_thursday + (7 * LEVEL)-1 AS week_end_date
- Of
- (
- SELECT TRUNC (p_from_date + 4, 'IW') - 4 AS first_thursday,-week should start to perform the pre-mounted THURSDAY based on the Start Date
- TRUNC (p_to_date + 4, 'IW') - 5 AS last_wednesday
- Of
- (
- SELECT to_date('01-JAN-2013') AS p_from_date,
- NVL (to_date('31-Dec-2013'), SYSDATE) AS p_to_date
- OF the double
- ) parms
- ) end_points
- CONNECT BY LEVEL<= (="" last_wednesday="" +="" 1="" -="">=>
Currently, this is the result I get (I'm only including the months of January and December here).
- Week_Start_Date Week_End_Date
- DECEMBER 27, 12 2 JANUARY 13
- JANUARY 3, 13 JANUARY 9, 13
- 10 JANUARY 13 JANUARY 16, 13
- 17 JANUARY 13 23 JANUARY 13
- 24 JANUARY 13 30 JANUARY 13
- 31 JANUARY 13 FEBRUARY 6, 13
December:
- NOVEMBER 28, 13 4 DECEMBER 13
- 5 DECEMBER 13 DECEMBER 11, 13
- 12 DECEMBER 13 18 DECEMBER 13
- 19 DECEMBER 13 DECEMBER 25, 13
What I would really like is based on start and end Dates, as well as the first and the last day of the month is similarly try nicely. I have provided and then gently break at the end of the month:
January:
- JANUARY 1, 13 2 JANUARY 13
- JANUARY 3, 13 JANUARY 9, 13
- 10 JANUARY 13 JANUARY 16, 13
- 17 JANUARY 13 23 JANUARY 13
- 24 JANUARY 13 30 JANUARY 13
- 31 JANUARY 13 JANUARY 31, 13
February:
- 1ST FEBRUARY 13 FEBRUARY 6, 13
- 7 FEBRUARY 13 FEBRUARY 13, 13
- 14 FEBRUARY 13 FEBRUARY 20, 13
- 21 FEBRUARY 13 FEBRUARY 27, 13
- 28 FEBRUARY 13 FEBRUARY 28, 13
November:
- 31 OCTOBER 13 NOVEMBER 6, 13
- 7 NOVEMBER 13 NOVEMBER 13, 13
- 14 NOVEMBER 13 NOVEMBER 20, 13
- 21 NOVEMBER 13 NOVEMBER 27, 13
- NOVEMBER 28, 13 4 DECEMBER 13
December:
- 1ST DECEMBER 13 DECEMBER 4, 13
- 5 DECEMBER 13 DECEMBER 11, 13
- 12 DECEMBER 13 18 DECEMBER 13
- 19 DECEMBER 13 DECEMBER 25, 13
- 26 DECEMBER 13 DECEMBER 31, 13
Why the "weeks" in November, have all 7 days, while the "weeks" in the first or the last week in the other month usually have less? (For example, February 28 is a 'week' alone.)
The following works for the other months:
WITH all_days AS
(
SELECT DATE "2013-01-01' + LEVEL - AS a_date 1
OF the double
CONNECT BY LEVEL<=>=>
)
SELECT DISTINCT
More GRAND (TRUNC (a_date + 4, 'IW') - 4)
, TRUNC (a_date, 'MONTH')
) AS week_begin
, The LEAST (TRUNC (a_date + 4, 'IW') + 2
TRUNC (LAST_DAY (a_date))
), Week_end
Of all_days
ORDER BY week_begin
;
Output:
WEEK_BEGIN WEEK_END
----------- -----------
January 1, 2013 January 2, 2013
January 3, 2013 January 9, 2013
January 10, 2013 January 16, 2013
January 17, 2013 January 23, 2013
January 24, 2013 January 30, 2013
January 31, 2013 January 31, 2013
February 1, 2013 February 6, 2013
February 7, 2013 February 13, 2013
February 14, 2013 February 20, 2013
February 21, 2013 February 27, 2013
February 28, 2013 February 28, 2013
...
November 1, 2013 November 6, 2013
November 7, 2013 November 13, 2013
November 14, 2013 November 20, 2013
November 21, 2013 November 27, 2013
November 28, 2013 November 30, 2013
December 1, 2013 December 4, 2013
December 5, 2013 December 11, 2013
December 12, 2013 December 18, 2013
December 19, 2013 December 25, 2013
26 December 2013 31 December 2013
-
Include the expected start Date and end Date for the management of SSHRC-Absence
Is it possible to include the scheduled Start Date and end Date of project to SSHRC, management of absences with the type of leave is confirmed?
Thanks in advanceHello
In this case, you should disable the option the absence request, so that by default all sheets are confirmed and the user do not have to apply once leave as planned and then comply.
You can see the id metalink - "How do I disable the State of Absence of R12 Absence Management Page [ID 786691.1]" to understand how to disable "Planned" option to request authorization for simple customization.
It will be useful.
Thank you
Sanjay -
Time of start and end elements
Hey there,
I have an application where I need two elements of time. I can hard code the data once and use a Select list, but this link below by Daniel McGhan is the way to go. Does anyone know how to access this code for the start and end time the elements? The article does not list how this is possible, but I can have over looked something... not sure. Thank you for reading this Thread.http://apex.shellprompt.net/pls/apex/f?p=566:4:198609458994020::NO:::
Hello:
Now sure to know how this was done, but it seems as likely javascript.
There is a very cool JQuery Timepicker that I really like and in fact for a really nice interface:
http://Haineault.com/Media/jQuery/UI-timepickr/page/
Kind regards
Bruce
Maybe you are looking for
-
HP ENVY 4504: HP ENVY 4504 does not print black ink even with full cartridge
Used by my office printer is not printing black ink. It does not, it is out of black ink, but anything on a page I print requiring black ink is absent. I checked the cartridge to see if she had missed and the printer was not to tell me, but she didn'
-
HP OfficeJet 6700: since Sierra cannot save updated scan
Hello I've updated to Sierra and my scanner works fine. I can see the documents scanned in my screen but the "Save" button is grayed out and not clickable, no matter what I do. I can scan but unable to save anything. Thank you!
-
Retrieve the label of a cluster in a global variable
Hi guys! In my application I was using a bunch of Boolean values for the different types of errors that I could have in my Subvi. It was not really practical manage all of these clusters, so I decided to create a world. Now the problem is I can't ext
-
I need to update my windows now. How do I do that?
Repeat with my computer and need to update my windows. Have the computer configured for automatic updates, but not happening and I can't risk waiting. I have not yet learned to service pak 2, yet. Help!
-
strontium usb not working not properly
whenever I insert my pendrive strontium (2.0 realtek card reader), it is detected (blinks) but does not display the USB on my laptop (dell inspiron 1545). In-> controller device manager USB-> realtek usb 2.0 card reader gets displayed twice.what of w