Selection based on the date of no recovery no lines

Hello

Why this doesn't work (returns 0 records)

< cfquery = name 'interrogate' Datasource = "#Application.Datasource #" >
SELECT *.
THE VOTING
WHERE the arguments start_date > = #DateFormat (now (), "dd-mm-yyyy") # and end_date < = #DateFormat (now (), "dd-mm-yyyy") #.
< / cfquery >

There are two rows on the table. One with start_date 12/01/2006 and the date of 12/19/2006, the other with 12/20/2006 start_date and end_date of 31/12/2006. Any of these get selected, once the current DAT files are 31/12/2006.

Thank you

My lack of formal training is showing through... I jump into the deep end.

I changed the statement for...

WHERE the #DateFormat (now (), "dd-mm-yyyy") # BETWEEN start_date and end_date

I read this as "where is today > = past date and today.<= future="" date".="" i="" want="" a="" date="" between="" the="" start="" and="" end.="" but="" that="" doesn't="" return="" any="">

What shocks you on the date format? JMA is the Australian date format.

I will start this topic.

Thank you
Tanya

Tags: ColdFusion

Similar Questions

  • Find (weekly) missing date ranges based on the Date of submission

    Nice day:

    I have a table that contains the data with a date of presentation of the report column.  If the requirements are that each employee must submit at least 1 weekly report beginning January 1, 2015, how can I find the weekly reports missing, based on the date of submission of reports.

    The ideas that I had:

    • Left join by partition by date (range between)
    • Create a date dimension view?

    Of course, I'm not sure how to approach this dilemma without creating a query of Monster.  Sometimes the simplest queries mistake me...

    Thank you, Aqua

    Here are the DDL for the table with the information from the presentation report (example):

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

    -The DOF for Table DTS_FORM_SAMPLE

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

    CREATE TABLE 'DTS_FORM_SAMPLE '.

    (NUMBER OF 'ID',

    VARCHAR2 (20) "CLOCK_NUMBER."

    NUMBER OF 'EMP_ID,'

    NUMBER OF "REPORT_TYPE."

    DATE OF THE "SUB_DATE.

    ) ;

    /

    INSERTION of REM in DTS_FORM_SAMPLE

    TOGETHER TO DEFINE

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2896, 'XX2444', 12810,1, to_date('02-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2897, 'XX2444', 12810,1, to_date('09-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2898, 'XX2444', 12810,1, to_date('16-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2899, 'XX2444', 12810,1, to_date('23-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2900, 'XX2444', 12810,1, to_date('30-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2901, 'XX2444', 12810,1, to_date('05-MAR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2902, 'XX2444', 12810,1, to_date('12-MAR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2903, 'XX2444', 12810,1, to_date('19-MAR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2904, 'XX2444', 12810,1, to_date('26-MAR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2920, 'XX2444', 12810,1, to_date('19-FEB-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2921, 'XX2444', 12810,1, to_date('22-JAN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2922, 'XX2444', 12810,1, to_date('05-FEB-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2923, 'XX2444', 12810,1, to_date('26-FEB-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2924, 'XX2444', 12810,1, to_date('29-JAN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2925, 'XX2444', 12810,1, to_date('12-FEB-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (2965, 'XX2444', 12810,1, to_date('30-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6970, 'XX2444', 12810,1, to_date('18-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6971, 'XX2444', 12810,1, to_date('25-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6972, 'XX2444', 12810,1, to_date('04-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6973, 'XX2444', 12810,1, to_date('11-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6978, 'XX2444', 12810,1, to_date('14-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6979, 'XX2444', 12810,1, to_date('21-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6980, 'XX2444', 12810,1, to_date('28-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6981, 'XX2444', 12810,1, to_date('07-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6948, 'XX2444', 12810,1, to_date('06-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6957, 'XX2444', 12810,1, to_date('09-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6958, 'XX2444', 12810,1, to_date('16-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6959, 'XX2444', 12810,1, to_date('23-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6960, 'XX2444', 12810,1, to_date('02-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8938, 'XX2444', 12810,1, to_date('14-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8939, 'XX2444', 12810,1, to_date('21-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8940, 'XX2444', 12810,1, to_date('28-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8941, 'XX2444', 12810,1, to_date('07-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8942, 'XX2444', 12810,1, to_date('14-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8943, 'XX2444', 12810,1, to_date('21-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8977, 'XX2444', 12810,1, to_date('04-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8978, 'XX2444', 12810,1, to_date('11-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8979, 'XX2444', 12810,1, to_date('11-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8980, 'XX2444', 12810,1, to_date('18-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8981, 'XX2444', 12810,1, to_date('18-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8982, 'XX2444', 12810,1, to_date('25-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8983, 'XX2444', 12810,1, to_date('25-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8984, 'XX2444', 12810,1, to_date('02-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8985, 'XX2444', 12810,1, to_date('02-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8953, 'XX2444', 12810,1, to_date('19-FEB-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9824, 'XX2444', 12810,1, to_date('20-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9825, 'XX2444', 12810,1, to_date('20-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9826, 'XX2444', 12810,1, to_date('20-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8972, 'XX2444', 12810,1, to_date('30-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8973, 'XX2444', 12810,1, to_date('30-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8974, 'XX2444', 12810,1, to_date('07-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8975, 'XX2444', 12810,1, to_date('28-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8951, 'XX2444', 12810,1, to_date('12-FEB-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8952, 'XX2444', 12810,1, to_date('19-FEB-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8954, 'XX2444', 12810,1, to_date('26-FEB-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8955, 'XX2444', 12810,1, to_date('26-FEB-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8956, 'XX2444', 12810,1, to_date('05-MAR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8957, 'XX2444', 12810,1, to_date('05-MAR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8958, 'XX2444', 12810,1, to_date('12-MAR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8959, 'XX2444', 12810,1, to_date('12-MAR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8960, 'XX2444', 12810,1, to_date('19-MAR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8961, 'XX2444', 12810,1, to_date('19-MAR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8962, 'XX2444', 12810,1, to_date('26-MAR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8963, 'XX2444', 12810,1, to_date('26-MAR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8964, 'XX2444', 12810,1, to_date('02-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8965, 'XX2444', 12810,1, to_date('02-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8966, 'XX2444', 12810,1, to_date('09-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8967, 'XX2444', 12810,1, to_date('09-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8968, 'XX2444', 12810,1, to_date('16-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8969, 'XX2444', 12810,1, to_date('16-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8970, 'XX2444', 12810,1, to_date('23-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8971, 'XX2444', 12810,1, to_date('23-APR-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8976, 'XX2444', 12810,1, to_date('04-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8986, 'XX2444', 12810,1, to_date('09-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8987, 'XX2444', 12810,1, to_date('09-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9041, 'XX2444', 12810,1, to_date('16-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9042, 'XX2444', 12810,1, to_date('16-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9043, 'XX2444', 12810,1, to_date('23-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9044, 'XX2444', 12810,1, to_date('23-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9045, 'XX2444', 12810,1, to_date('30-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9046, 'XX2444', 12810,1, to_date('30-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9047, 'XX2444', 12810,1, to_date('06-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9048, 'XX2444', 12810,1, to_date('06-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8944, 'XX2444', 12810,1, to_date('22-JAN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8945, 'XX2444', 12810,1, to_date('22-JAN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8946, 'XX2444', 12810,1, to_date('29-JAN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8947, 'XX2444', 12810,1, to_date('29-JAN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8948, 'XX2444', 12810,1, to_date('05-FEB-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8949, 'XX2444', 12810,1, to_date('05-FEB-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (8950, 'XX2444', 12810,1, to_date('12-FEB-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9527, 'XX2444', 12810,1, to_date('13-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9528, 'XX2444', 12810,1, to_date('13-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (9529, 'XX2444', 12810,1, to_date('13-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6739, 'YY7223', 11093,8, to_date('15-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6740, 'YY7223', 11093,8, to_date('21-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6741, 'YY7223', 11093,8, to_date('22-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6742, 'YY7223', 11093,8, to_date('25-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6743, 'YY7223', 11093,8, to_date('26-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6744, 'YY7223', 11093,8, to_date('27-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6745, 'YY7223', 11093,1, to_date('04-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6746, 'YY7223', 11093,1, to_date('11-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6747, 'YY7223', 11093,1, to_date('18-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6748, 'YY7223', 11093,1, to_date('25-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6749, 'YY7223', 11093,11, to_date('01-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6750, 'YY7223', 11093,11, to_date('15-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (6751, 'YY7223', 11093,10, to_date('01-JUL-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (11017, 'YY7223', 11093,1, to_date('07-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (11018, 'YY7223', 11093,1, to_date('14-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (11019, 'YY7223', 11093,1, to_date('21-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (11020, 'YY7223', 11093,1, to_date('28-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (11021, 'YY7223', 11093,1, to_date('04-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (11022, 'YY7223', 11093,1, to_date('11-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (11023, 'YY7223', 11093,1, to_date('18-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (11024, 'YY7223', 11093,1, to_date('25-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (11025, 'YY7223', 11093,10, to_date('31-MAY-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (11026, 'YY7223', 11093,10, to_date('30-JUN-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13115, 'YY7223', 11093,1, to_date('13-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13201, 'YY7223', 11093,1, to_date('20-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13287, 'YY7223', 11093,1, to_date('27-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13373, 'YY7223', 11093,10, to_date('08-SEP-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13489, 'YY7223', 11093,8, to_date('01-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13490, 'YY7223', 11093,8, to_date('02-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13491, 'YY7223', 11093,8, to_date('03-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13492, 'YY7223', 11093,8, to_date('04-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13493, 'YY7223', 11093,8, to_date('05-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13494, 'YY7223', 11093,8, to_date('06-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13495, 'YY7223', 11093,8, to_date('07-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13496, 'YY7223', 11093,8, to_date('08-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13497, 'YY7223', 11093,8, to_date('09-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13498, 'YY7223', 11093,8, to_date('10-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13499, 'YY7223', 11093,8, to_date('11-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13500, 'YY7223', 11093,8, to_date('12-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13501, 'YY7223', 11093,8, to_date('13-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13502, 'YY7223', 11093,8, to_date('14-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13503, 'YY7223', 11093,8, to_date('15-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13504, 'YY7223', 11093,8, to_date('16-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13505, 'YY7223', 11093,8, to_date('17-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13506, 'YY7223', 11093,8, to_date('18-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13507, 'YY7223', 11093,8, to_date('19-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13508, 'YY7223', 11093,8, to_date('20-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13509, 'YY7223', 11093,8, to_date('21-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13510, 'YY7223', 11093,8, to_date('22-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13511, 'YY7223', 11093,8, to_date('23-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13512, 'YY7223', 11093,8, to_date('24-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13513, 'YY7223', 11093,8, to_date('25-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13514, 'YY7223', 11093,8, to_date('26-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13515, 'YY7223', 11093,8, to_date('27-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13516, 'YY7223', 11093,8, to_date('28-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13517, 'YY7223', 11093,8, to_date('29-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13518, 'YY7223', 11093,8, to_date('30-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13519, 'YY7223', 11093,8, to_date('31-AUG-15','DD-MON-RR'));

    Insert into DTS_FORM_SAMPLE (ID, CLOCK_NUMBER, EMP_ID, REPORT_TYPE, SUB_DATE) values (13030, 'YY7223', 11093,1, to_date('06-AUG-15','DD-MON-RR'));

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

    -Table DTS_FORM_SAMPLE constraints

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

    CHANGE ALTER TABLE 'DTS_FORM_SAMPLE' ('ID' ENABLE NOT NULL);

    /

    Or more simple:

    Select emp_id, w.wk, to_char (wk, 'ww') x

    from (select trunc (date ' 2015-01-01' + 7 * (level - 1), 'ww') wk)

    of the double

    connect by level<=>

    ) o

    left outer join

    s dts_form_sample

    by (emp_id) partition

    We trunc (s.sub_date, 'ww') = w.wk

    where sub_date is null

    order to emp_id,

    x

    /

    EMP_ID WK X
    ---------- --------- --
    11093 1ST JANUARY 15 01
    11093 8 JANUARY 15 02
    11093 15 JANUARY 15 03
    11093 22 JANUARY 15 04
    11093 29 JANUARY 15 05
    11093 5 FEBRUARY 15 06
    11093 12 FEBRUARY 15 07
    11093 19 FEBRUARY 15 08
    11093 26 FEBRUARY 15 09
    11093 5 MARCH 15 10
    11093 12 MARCH 15 11

    EMP_ID WK X
    ---------- --------- --
    11093 19 MARCH 15 12
    11093 26 MARCH 15 13
    11093 2 APRIL 15 14
    11093 9 APRIL 15 15
    11093 16 APRIL 15 16
    11093 23 APRIL 15 17
    11093 30 APRIL 15 18
    11093 37 15 - SEP - 10
    17-SEVEN 11093.-15 38
    24-SEVEN 11093.-15 39
    11093 1 OCTOBER 15 40

    EMP_ID WK X
    ---------- --------- --
    11093 8 OCTOBER 15 41
    11093 15 OCTOBER 15 42
    11093 22 OCTOBER 15 43
    11093 29 OCTOBER 15 44
    11093 5 NOVEMBER 15 45
    11093 12 NOVEMBER 15 46
    11093 19 NOVEMBER 15 47
    11093 26 NOVEMBER 15 48
    11093 3 DECEMBER 15 49
    11093 10 DECEMBER 15 50
    11093 17 DECEMBER 15 51

    EMP_ID WK X
    ---------- --------- --
    11093 24 DECEMBER 15 52
    11093 31 DECEMBER 15 53
    12810 1ST JANUARY 15 01
    12810 8 JANUARY 15 02
    12810 15 JANUARY 15 03
    12810 27 AUGUST 15 35
    12810 15 - SEP - 03 36
    12810 37 15 - SEP - 10
    17-SEVEN 12810.-15 38
    24-SEVEN 12810.-15 39
    12810 1 OCTOBER 15 40

    EMP_ID WK X
    ---------- --------- --
    12810 8 OCTOBER 15 41
    12810 15 OCTOBER 15 42
    12810 22 OCTOBER 15 43
    12810 29 OCTOBER 15 44
    12810 5 NOVEMBER 15 45
    12810 12 NOVEMBER 15 46
    12810 19 NOVEMBER 15 47
    12810 26 NOVEMBER 15 48
    12810 3 DECEMBER 15 49
    12810 10 DECEMBER 15 50
    12810 17 DECEMBER 15 51

    EMP_ID WK X
    ---------- --------- --
    12810 24 DECEMBER 15 52
    12810 31 DECEMBER 15 53

    57 selected lines.

    SQL >

    However OP question must answer is start of week date.

    SY.

  • How to plan the report filtered by dynamic date based on the date, the Agent is running

    Hello

    I have a question about account using OBIEE agent.

    If I run an agent today to deliver A report, can I me A report based on the date of last Monday or any dynamic dates?

    For example, say is today, December 18, 2013, and my agent is run according to how I put the calendar. Now the content of the delivery report one being delivered. Now A report has a date column, normally this column is filtered by the current date. But if it comes through the agents to different users, the data should be the previous Monday, so in this case, 9 December 2013. When this agent is run once again, declared December 27, 2013, then the report must be filtered by December 16, 2013, which is the previous Monday 27 dec.

    Something like this is possible in OBIEE 11 G?

    Thanks in advance.

    Yala,

    Not in a straightforward way

    (1) let the report through Agent with filter current Date

    (2) after he ran for the first time you can see IBOT name/last execution time (LAST_RUNTIME_TS) in S_NQ_JOB

    Create a variable reference 'last_run_agent' to aid in sql to get max (LAST_RUNTIME_TS)

    SELECT max (LAST_RUNTIME_TS) from s_nq_job, whose name = "AGENT_NAME;

    Change analysis with current date filter report and amend accordingly the condition of filter to filter on repository variable, newly created

    Thank you

    Angelique

  • Get the old value and the new value based on the date

    Hello

    I have a table called list created below with the rest of the insert statements.

    CREATE TABLE ROSTER
    (
    NUMBER OF ROSTER_EMPLOYEE_DEF_ID
    NUMBER OF EMPLOYE_ID
    NUMBER OF DEFINITION_REGION_CODE
    NUMBER OF DEFINITION_DISTRICT_CODE
    NUMBER OF DEFINITION_TERRITORY_CODE
    START_DATE DATE,
    END_DATE DATE
    )



    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (1,299,222,333,444, 'JUNE 1, 2011', 30 JUNE 2011 "")

    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (2,299,223,334,445, "1 JULY 2011', JULY 20, 2011" "")

    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (3,299,224,335,446, 'AUGUST 1, 2011', AUGUST 30, 2011 "")

    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (4,300,500,400,300, 'JUNE 1, 2011', JUNE 20, 2011 "")

    INSERT IN THE LIST
    (ROSTER_EMPLOYEE_DEF_ID, EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE)
    VALUES
    (5,300,501,401,301, "1 JULY 2011', JULY 20, 2011" "")


    In the table above we have columns like

    EMPLOYE_ID, DEFINITION_REGION_CODE, DEFINITION_DISTRICT_CODE, DEFINITION_TERRITORY_CODE, START_DATE, END_DATE

    The result I'm looking for the table above is based on the employe_id OF start_date AND end_date

    I need to get the OLD_DEFINITION_REGION_CODE and the NEW_DEFINITION_CODE
    Similarly, OLD_DEFINITION_REGION_CODE and the NEW_DEFINITION_REGION_CODE
    and OLD_DEFINITION_TERRITORY_CODE and the NEW_DEFINITION_TERRITORY_CODE


    I need to get a row of data for each employee saying old value and the new value

    for the employee 299 there are 3 records he puts the new record which is the latest date is to say beginning August 1, 2011 and end date of recordings old 30 August 2011
    beginning July 1, 2011 and July 20, 2011


    For the data in the table above, I need to get the data as below


    EMPLOYE_ID OLD_DEFINITION_REGION_CODE NEW_DEFINITION_CODE OLD_DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE START_DATE END_DATE
    299 223 224 334 335 20 JULY 11 30 AUG 11
    300 500 501 400 401 20 JUNE 11 JULY 20, 11


    Please suggest me to get the result above, based on the data. Please let me know if my messages are not clear


    Thank you
    Sudhir
    SELECT  EMPLOYEE_ID,
            OLD_DEFINITION_REGION_CODE,
            NEW_DEFINITION_REGION_CODE,
            OLD_DEFINITION_DISTRICT_CODE,
            NEW_DEFINITION_DISTRICT_CODE,
            OLD_DEFINITION_TERRITORY_CODE,
            NEW_DEFINITION_TERRITORY_CODE,
            START_DATE,
            END_DATE
      FROM  (
             SELECT  EMPLOYEE_ID,
                     ROW_NUMBER() OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE DESC) RN,
                     LAG(DEFINITION_REGION_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_REGION_CODE,
                     DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE,
                     LAG(DEFINITION_DISTRICT_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_DISTRICT_CODE,
                     DEFINITION_DISTRICT_CODE NEW_DEFINITION_DISTRICT_CODE,
                     LAG(DEFINITION_TERRITORY_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_TERRITORY_CODE,
                     DEFINITION_TERRITORY_CODE NEW_DEFINITION_TERRITORY_CODE,
                     LAG(END_DATE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) START_DATE,
                     END_DATE
               FROM  ROSTER
            )
      WHERE RN = 1
    /
    
    EMPLOYEE_ID OLD_DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE OLD_DEFINITION_DISTRICT_CODE NEW_DEFINITION_DISTRICT_CODE OLD_DEFINITION_TERRITORY_CODE NEW_DEFINITION_TERRITORY_CODE START_DAT END_DATE
    ----------- -------------------------- -------------------------- ---------------------------- ---------------------------- ----------------------------- ----------------------------- --------- ---------
            299                        223                        224                          334                          335                           445                           446 20-JUL-11 30-AUG-11
            300                        500                        501                          400                          401                           300                           301 20-JUN-11 20-JUL-11
    
    SQL>  
    

    SY.

  • How to hide/show a field based on the data from more than 1 field?

    Hello.

    I'm trying to hide/show a based on the data of field2 and field3, Field1

    in fact using dynamic measurements I can only hide/show Field1 Field2-based, but I need a combination, for example:

    If field1 = 'A' and field2 = 'B', then see the field3, other hide field3

    y at - it an easy way to do it.

    I use Application Express 4.2.4.00.08

    Thanks in advance

    Dynamic action

    On the changes

    jQuery selector: #P1_ITEM_1, #P1_ITEM_2

    Condition: JavaScript

    $v ('P1_ITEM_1') == 'A' & $v ('P1_ITEM_2') == 'B '.

    Real Action: show item 3

    Action of false: hide item 3

  • Creating primary key based on the Date

    Hi all
    I am trying to create a unique ID for each record, based on the date that the record is created. Example, if the folder is created today, I want to the key is 20101130XX where XX is a sequential list of numbers e.g. 01, 02, 03 etc... in the case where more than one person creates a record today.

    If 3 people created record yesterday their unique ID would be

    2010112900
    2010112901
    2010112902

    and then comes the midnight and someone creates a new record, that it would be

    2010113000

    This is intended to give each record with a unique ID that will be used to reference the ticket.

    We are already using the date format, but currently users have to manually enter the id and who can create errors such as 2011112900 when it should have been 2010112900 then instead of 2010 they put 2011

    I'm not sure how to create a trigger to generate this type of unique identification number and would appreciate any help

    Thanks in advance

    Wally

    Never said it was perfect, but then again, it is a rather sticky issue... Reset sequence work would be scheduled to run @ some point... You entered in tables past 24/7? I would say that system could be locked for those 5 minutes sequence is updated, or the table is locked to allow no access while the process is...

    To be honest, that is the question in the design of a key value that is dependent on outside data, as apposed to a surrogate key, which is generated System... Again, you could have at ONCE and have the surrogate for a key key REAL primary and date + sequence as a secondary key for the use of basic unit of carbon...

    Thank you

    Tony Miller
    Webster, TX

    If vegetable oil is made from vegetables, then what is baby oil?

  • How to manage the Data Association output when no line not returned?

    BPM 11 g, I use a Service to select a line in an external database in passing a parameter using a database adapter.  Works fine when a row is returned.  But if no row is returned (which can happen, because no match is not found on the selection based on the value of the parameter), I get an error on the composite as output data Association has return values, including integers, mapped to a data object, I defined in the process.  Well, if no row is found, the integer value is empty and mistakes to try to save him.

    How to handle this situation?

    The specific message is:

    The expression bpmn:getDataOutput('wm91AInterfaceMainCollection') / ns:Wm91AInterfaceMain [1] / ns:board is empty. An attempt to read or copy the referenced data or calculated by the XPath generated invalid data, according to the XML schema, or did not contain some optional data. Ensure that the variable result or expression named in the error message is not empty. Enable related data elements XML schema validation for the enforcement data are valid.

    I must be missing something obvious here, but can't find a way to handle this.  Thanks in advance!

    Hey Joe,

    Of course, others will be have another idea, but opt for the XSLT option for mapping your data.  Using XSLT, you can check for null in an 'if '.

    Dan

  • Select multiple choice based on the data control does not not value in the correct form

    Hello, I am using JDeveloper 12.1.2

    I made a choice of several select based on an attribute of the year to a data control and I have a method in my managed bean that retrieves the selected values in the select choice of many, and on the basis that I want to do some queries, but the value that returns the selection is not the value of the attribute is the value of memory (or what is the correct value name..)

    Here is the code:

    < af:selectManyChoice value = "#{bindings." Label AnoList1.inputValue}' = 'Ano '.

    ID = "smc1.

    valueChangeListener = "#{OBIEE_managed_bean.» AnoListSelection}.

    autoSubmit = 'true '.

    Binding = "#{OBIEE_managed_bean.anoListBinding} '"

    immediate = "true" >

    < f: selectItems value = "#{bindings." AnoList1.items}"id ="si1"/ >

    < f: validator binding = "#{bindings." AnoList1.validator} "/ >"

    < / af:selectManyChoice >

    Managed bean:

    public void AnoListSelection (ValueChangeEvent valueChangeEvent) {}

    valueChangeEvent.getComponent () .processUpdates (FacesContext.getCurrentInstance ());

    try {}

    System.out.println ("Valor link yearChoice:" + anoListBinding.getValue () m:System.NET.SocketAddress.ToString ());

    ...

    The output is as follows:

    Valor link yearChoice: [Ljava.lang.Object;@4939cade

    Year: Ljava.lang.Object;@7135da60

    This normally happens when the toString is not defined, but how I have to fix this? Someone at - it had the same problem? Any advice?

    Kind regards

    Frederico.

    Hi Frederico

    I'm fine hope you are too.

    Sorry, but you can try

    {for (Object item: (Object []) {valueChangeEvent.getNewValue ())}

    System.out.println (Item.ToString ());

    }

    This should give you something.

  • change the field type selection list of text based on the data in the other domain.

    Hello

    We have a requirement where we are looking to display the page as element select list or a free text field based on the value of the item to another page.

    Say, we have two fields

    Day:

    Products:

    If day = 'Monday' produced a drop in low field of another product would be a free text field.   Is this possible in APEX?

    This is the configuration I did.

    I used the field produced twice (as a text and list field select) as an element of a page., dependent on the value of the day I used the dynamic properties of actions to show/hide these fields.

    However, when I click on submit, it throws an error:

    ORA-06550: line 1, column 108: PL/SQL: ORA-00957: name of column in double ORA-06550: line 1, column 13: PL/SQL: statement ignored


    Kind regards

    Satya

    You can have both share the same database column, the process of the APEX DML does not know how to consolidate.

    You will need to add a calculation and determine the real value based on two fields, up to an only one mapped to db.

  • How to use a parameter query to select and display the data in the table of the façade

    Hiiiiii

    I am using Access 2007 database
    I want to select the specific data in the database using control of the chain as 'select product, size, weight of ProductInfo where barcode (chain control) =?'  and also display the same table of façade.

    I use the connected database toolkit.
    I saw the example of the parameterized insert, but it did not help to use parameterized select query, as well as to display data of parameterized select query.

    I looked for example on parameterized select query, but I don't have any.
    So pls guide me how to do this. I would like to know the other method (if any) that the use of parameter query to perform the same thing.
    If possble pls share a vi reference.
    Thank you!!!

    HII szewczak
    Thanks for the reply
    but I did not getsolution in one of your shared links
    My problem is solved. There is no need to use the parameter query to select control values
    In my case I want to display data from database where bar code is even entered by the user
    I use the data function DB TOOL CHOOSE and create the condition of chain based on concatenation of strings

  • Then the validation of a detail or form based on the date picker - upper effective Date?

    Hi, creates a BP custom with the effective date in field added to my details form or higher. Can I have a set of validation rules up for my top of or the form detailed such as the effective date cannot be greater than the current date? Thanks in advance.

    For the decimal amount, you need to change the formula type, the default value is a numerical formula, but you must choose the date difference. This is the online help:

    To create a date-difference formula

    1. Open the form that contains the field for which you want to create a formula. The form designer window opens.
    2. In the form designer window, select the date field that you want to create the formula. When the calculation is performed, this field appears as read-only on the form and will automatically update each time that the fields that make up the formula change.
    3. Click the formula button. A creation of the formula window opens.
    4. In the formula field Type, choose the difference in Date in the list. The window expands to show additional fields, as shown in the table below.
    5. Click OK to save your changes and close the window.

    In this area:

    Follow these steps:

    Last Date

    Click on the arrow down. uDesigner displays the list of all numeric fields on the form. In this list, choose the field that contains the later of the two dates that will be used in the calculation.

    Earliest date

    Click on the arrow down. In this list, choose the field that contains the first of the two dates that will be used in the calculation.

    Calculations based on

    Choose the calendar days to include all days of the week in the calculation. Choose the days of work to use only the working days of the week in the calculation.

  • conditional merge based on the date

    Need help on a merge statement. I need to merge two dataset. But when the key match, I also need to cpmpared the date before I merege it.
    See code below
    drop table x1;
    
    drop table y1;
    
    select * from x1;
    
    select * from y1;
    
    create table x1 (id number,name varchar2(10),cdate date,status varchar2(1));
    
    create table y1 (id number,name varchar2(10),cdate date,status varchar2(1));
    
    insert into x1 select 1,'A',sysdate - 100,'Y' from dual;
    
    insert into y1 select 1,'A',sysdate - 50,'N'  from dual ;--should change x1.status to y1.status  and x1.cdate to y1.cdate as y1.cdate > x1.cdate
    
    insert into x1 select 2,'B',sysdate - 20,'Y' from dual;
    
    insert into y1 select 2,'B',sysdate - 120,'N' from dual ;--should leave status in x1 alone
    
    insert into y1 select 3,'c',sysdate - 10,'Y' from dual; --should do an insert on x1 
    
    commit;
    
    --how do I do a conditional merge (key=id,name)
    -- based on the cdate. If y1.cdate >= x1.cdate then take the y1.status  and y1.cdate
    
    --desire output
    select * from x1
    1     A     01/01/2012 10:54:35 AM     N
    2     B     1/31/2012 10:54:37 AM     Y
    3     C     1/31/2012 10:54:37 AM     Y

    Hello

    You can add a WHERE clause to the WHEN MATCHED THEN UPDATE section.

    WHERE   x1.cdate  < y1.cdate
    

    Thanks for posting the CREATE TABLE and INSERT statements; It is very useful. It would also help if you have validated your MERGE statement, even if it does not work perfectly.

  • How can I apply the automatic spelling correction for selected fields from the data entered by the users of forms?

    I would like to be able to apply the spelling correction of selected fields in the forms I created using LiveCycle Designer 8.2 at runtime, as opposed at design time.  I understand that version 8 LCD has a spelling corrector new OWL for form designers.  But I want to say check the data entered by users using Acrobat Reader.  And I want to apply the spelling correction automatically on only selected fields.

    Currently it seems that fill out my forms, users must know how manually right-click on each field, and then select "Spell Check" from the dialog box to check spelling mistakes in the data that the user entered into the form.

    I would like to discover a way to apply the correction spelling in certain areas, as well as I am able to do in forms created using Acrobat Pro.  Acrobat Pro, I can set a property for each field to require the spell check.  but this feature seems to be missing in Livecycle Designer.

    I have check the object model for XFA forms hoping I could find a method I can call a JavaScript file, check the spelling based on an event such as onBlur.  But I have not found a method of spelling.

    Am I missing something simple?  Is there a way to define each field out controls when a user is filling out the form using the free software Acrobat Reader?

    Our users are not sophisticated and forcing spell check each field separately just doesn't cut it...

    Any help on this will be greatly appreciated.

    Thank you!

    -David Bartholomew

    Hi David,

    Two things...

    At design time has set the locale of the form to that coming out Acrobat checks. For example the locale English (United States) and English (United Kingdom) have Spellers; However the English (Ireland) does not work. Check the warnings tab to see if the spell checking is supported for your locale.

    If your locale form supports spell checking, so you can go to the script of the button below.

    If you form local does NOT support spell checking, Stephanie has a great work-around to force spell (http://forums.adobe.com/message/2233945#2233945).

    Put a normal button on the form and in the click event must have the following:

    app.execMenuItem ("spelling: spell check");

    Which will open the checker spelling for all fields.  Thanks to Paul for extract all elements of menu available (http://forums.adobe.com/message/1912914#1912914).

    Good luck

    Niall

  • Best results of 10 based on the date

    Hello

    I tried to find a way to get 10 rows of data based on the latest release dates, which is sort by newest in descending order. Here is the table and SQL that I use. By the way, I am using Oracle 10 g.

    SQL = SELECT movie.id, movie.name, movie.date_released,actor.actor_name, movie_type.type FROM movie INNER JOIN actor on movie.id = actor.movie_id INNER JOIN movie.id = movie_type.movie_id where date_released > '10-OCT-2008' and rownum <=10 order by date_release desc;
    I used date_released in where clause for a little record to return because I have a lot of documents that leave from 2001.Tell me if my approach is wrong.




    But I don't get the expected result. The result I get are not as expected. For example, it displays only from 20/04/2010 in descending order. What can I do it wrong? Your help will be greatly appreciated. Thank you.

    Edited by: Software_Janitor may 27, 2010 05:31

    ROWNUM is assigned before the ORDER BY clause, which means that you cannot restrict your results by using ROWNUM in the same query in the ORDER BY. You must place the request with the ORDER BY in a subquery and filter results at the top of the page in the outer query like this:

    SELECT *
    FROM
    (
            SELECT 
            FROM   
            WHERE  
            ORDER BY 
    )
    WHERE rownum <= ;
    

    I tried to convert your example:

    SELECT *
    FROM
    (
      SELECT movie.id
           , movie.name
           , movie.date_released
           , actor.actor_name
           , movie_type.type
      FROM       movie
      INNER JOIN actor      ON movie.id = actor.movie_id
      INNER JOIN movie_type ON movie.id = movie_type.movie_id
      WHERE date_released > TO_DATE('10-OCT-2008','DD-MON-YYYY')
      ORDER BY date_release DESC
    )
    WHERE ROWNUM <= :some_val
    ;
    

    It's called a "Top - N" query Here is an article showing other alternatives: on Top-n and Pagination queries

    I hope this helps!

    Edited by: Centinul may 27, 2010 08:26

  • The smart Albums based on the date range cause app Crash Photos

    While I'm setting up a new Smart Album based on day of photos between 12/01/2015 and 31/12/2015 the Photos app closes with a crash. Cannot set the second date (the end date for this album). However, I can easily create a new Smart Album for next month (01/01/2016 and 01/31/2016). I create smart Albums, because the new Photos app does not like the old iPhoto does with my Photos from the photo gallery.

    How can I solve this? I don't have an album of December...? !

    You are in an area where the date format is different from the United States?  Earlier this year, we have seen small business issues have reported that rules for smart albums date range do not work with the primary language set to French or German.

    Try to change the primary system language to English with an English date format. Photos could be trying to read the 12/31/2015 as the 12th day of the month 31.

    Or use a different date based on 'before' rule and after.

Maybe you are looking for