find data between specific times in a date range

HII all,.
I'm pretty new in PL/SQL so any help will be greatly appreciated. I'm trying to retrieve data from a set of tables. one of these tables has a field that is a timestamp in the format «dd/mm/yyyy hh24:mi:ss» field asked me to produce data for records that were created between 16:00 and 20:00 between 01/01/2010 and 31/08/2010. I can eat the date of issue, but the question of time is that I'm stuck.

your help would be appreciated
SELECT *
FROM my_table
WHERE col_date BETWEEN DATE '2010-01-01' AND DATE '2010-09-01'
AND TO_NUMBER ( TO_CHAR ( col_date, 'HH24MI' )) BETWEEN 1600 AND 2000;

Now something difficult:
A DATE data type represents a specific time. It's something abstract. There's no format. It is in some cases stored internally, but we know not how (in fact, we know a little). Cannot directly display a DATE value - it is not a text, it is a point in time, it can be established on a calendar and a clock, but not on the screen. DATE FORMAT allows us to tell Oracle how we want it to be converted into a string and displayed. Do we want to day/month/year or year/day/month? Do we want a 24 hour clock 12-hour am/pm or? The same value, the same point in time can be displayed using different channels, produced using different DATE FORMATS. "Friday, September 17, 2010 13:15" is exactly the same point in time as "2010-09-17 13:15" - the only difference is the FORMAT. This allows us to perform several clever tricks with DATE data. Ok?
(If you do not specify a DATE format, and then there are the values by default for your session and for the database. But the principle remains the same: a point-in-time value is converted to a string using the DATE FORMAT).

Tags: Database

Similar Questions

  • Send an email at a specific time with data

    Hello everyone, I hope that I write in the right forum.

    I am very new to LabView but I need quickly.

    Where I work they have a very complicated VI, a facility emailer who, when a fualts of tests for low current or overheating as the VI will send an email on what failing platform and on what date and the fault.
    I was instructed to have these VI email "update" every morning at 08:00, or any time, I decide.

    Basically, the email will contain,

    -Reference number

    -current test duration

    -temp... etc

    I guess I can do a while loop around the whole VI? What should I use to initialize an email at a specific time?

    I'm sure it's a question of newbie, so for that I apoligize!

    Thank you very much for your help!

    Ryan

    You can generate a dynamic event or...

  • How to calculate the periods that overlap between two or more given the date range?

    Hi all

    If there are several durations then how we can calculate the period of time that overlap between these times.

    For example: for 3 time periods. 03/12/2015-16/08/2015, 05/01/2015 to 31/07/2015 and the 06/09/2015 to 30/11/2015, how the overlap period can be calculated?

    There are many potential unknowns in your question.  For example, you want to count any overlap at all?  If two dates overlap, what matters?  Overlap - each of them?

    In any case, here is a solution that counts how many periods are overlapping in any point in time...  She, of course, using temporal logic.  You can then use ValueAt(), WhenLast(), WhenNext(), etc. as appropriate.

    Assume that your model has a child entity called 'the period' with name 'all time periods' relationship and basic attributes 'start date of the period of time' and 'date of end of period of time'.

    In your example:

    an entity should have the time period start date = 03/12/2015 and the date of end of period of time = 16/08/2015

    another entity might have the time period start date = 01/05/2015 and the date of end of period of time = 31/07/2015

    another entity might have the time period start date = 06/09/2015 and the date of end of period of time = 30/11/2015

    To find the number of overlapping over time, we want to count or entities that have an active period, so the rule is perhaps the sum:

    the number of overlapping = the number of all the periods for which it is true that the time period is active

    How do we know a time is active?  This is the time logic comes in.  He is active on or after the start date or no later than the end date:

    the time period is active if

    TemporalOnOrAfter (the date of beginning of period of time) and

    TemporalOnOrBefore (date of end of period of time)

    That's all.  Now, you can perform a temporal visualization of the 'number of overlapping' and you'll see it rise and fall over time.  As a reference, he said that the number of overlapping = 3.0 from 06/09/2015 across 31/07/2015.

    I hope this helps.  You can use the same model to count periods of time functions, but you end up having to use the most logical date.  You of course can count the total number of entities and compare this number of overlap over time to see if they overlap, but I digress...

  • 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.

  • Copy files from specific date ranges in a Batch file

    I'm trying to copy files from a folder with many subfolders to another drive using a batch file. I want to copy the files in the date ranges specific (e.g. 01/01/2016 to 03/31/2016).

    I use this with Xcopy command:

    xcopy "C:\Users\John\Pictures\*.*" F:\BACKUP\Pictures/s/h/i/y

    It works, but I want to send groups of files by date for the different destination folders. I'm having a problem by specifying a date range in the command line.

    Is this possible with xcopy or robocopy? Does anyone know how to list the date rang in the command?

    Thankss in advance,

    John

    Hello

    Please contact Microsoft Community.

    I understand you wanted to know about the files and folders by using the copy command line.

    I suggest you go through the links below:

    Refer to the suggestion given by SpiritX MS MVP replied on 14 August 2010 and check if that helps:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-files/how-do-i-use-Xcopy-with-Windows-7/adab8f38-719F-451b-9500-c1d6ce385ad1?auth=1

    If the still the problem persists, I suggest you to post your query on TechNet:

    https://social.technet.Microsoft.com/forums/en-us/b11eb5a3-63dc-4636-82fd-ddc22fd8f2f8/cmd-file-to-copy-file?Forum=MDT

    Feel free to write us again with the status of the issue.

  • y at - it sites to find dates and the drivers, windows 7

    is there free online sites to find dates and pilots.

    running windows 7

    Thank you

    The best place is the manufacturer of your computer - try first. They should provide free drivers for the supported versions of Windows.

    You can also try the individual hardware components manufacturers. For example, NVidia, AMD and Intel for graphics cards. In general, this should be free.

    I would recommend avoiding utilities part 3rd pilot and Web sites, especially ones that cost money. It is usually unnecessary to use. He peut also have concerns quality and/or safety with some of them.

    Windows Update can also provide drivers for some hardware. There is no cost and no real security issues by using this method, but drivers may be generic and lacking some features.

    I prefer to install drivers when I want to and do it manually. It keeps me in control of the process and means if there is a problem it is easier to track what if its done to another more "in bulk".

  • Receive every month between date Range

    Hi all

    I said you want to display the month and year for the date range. IE Start date: 01-11-12, end Date: 31/05/13

    SELECT COUNT(T1.CUST_NM) AS COUNT, TO_CHAR(T1.CREATE_DT,'MON-YY') AS MONTH, SUM(T3.DISBURSEMENT_LIMIT) AS TOTAL
      FROM CUSTOMER T1, 
     ACCOUNT T2, LOAN_ACCOUNT T3, CREDIT_APPL T4, PORTFOLIO T5 WHERE  T1.CUST_ID = T2.CUST_ID  AND T2.ACCT_ID = T3.ACCT_ID  AND T3.APPL_ID = T4.APPL_ID  AND 
     T4.PORTFOLIO_ID = T5.PORTFOLIO_ID
    and t1.CREATE_DT between to_date('01-01-10','DD-MM-YY') and  to_date('30-12-10','DD-MM-YY') 
     GROUP BY TO_CHAR(T1.CREATE_DT,'MON-YY')
    
    
    
    


    Exit SQL:

    CountyMonth-yearTotal
    8JAN-1015300
    6FEB-104245000
    11AUG-10144500
    6DEC-1015500

    Now SQL returns matching records to date. But the requirement is to display the name of the month, the number and total 0 if there is no data found.

    Power required:

    County Month-year Total
    8Jan15300
    1Feb-10118750
    0March-100
    0Apr-100
    0May - 100
    0Jun - 100
    0Jul-100
    11Aug-10144500
    0Seven.-100
    0Oct-100
    0Nov - 100
    6Dec - 1015500

    Please suggest me SQL to archive the above of the requirement.

    Thanks and greetings

    Saami

    Try this

    with t

    as

    (

    Select count (t1.cust_nm) as County

    to_char(t1.create_dt,'mon-yy') per month

    , sum (t3.disbursement_limit) total

    the t1 client

    in t2

    loan_account t3

    credit_appl t4

    the t5 portfolio

    where t1.cust_id = t2.cust_id

    and t2.acct_id = t3.acct_id

    and t3.appl_id = t4.appl_id

    and t4.portfolio_id = t5.portfolio_id

    and t1.create_dt between to_date ('01-01-10', ' dd-mm-yy')

    and to_date ('30-12-10', ' dd-mm-yy')

    Group

    by to_char(t1.create_dt,'mon-yy')

    )

    t1

    as

    (

    Select to_char (add_months (to_date('01-01-10','dd-mm-yy'), level-1), 'Mon - yy') month_list

    of the double

    connect

    by add_months (to_date('01-01-10','dd-mm-yy'), level-1)<= >

    )

    Select nvl (t.count, 0) as County

    t1.month_list per month

    , nvl (t.total, 0), as total

    from t1

    left

    Join t

    on t1. month_list = t.month

  • Can't find "Data export" option under 'Tools' in 'SQL Developer?

    Can't find "Data export" option under 'Tools' in 'SQL Developer?
    How can I solve this problem?
    Thank you
    Siva

    Hello
    on the Tools menu, you will see "Unloading of database" option. That's what you're looking for (the 'Export' label has been changed to "Unload".
    I hope this helps.
    R / Zaf

  • find data files belong to the backup piece

    Hi all

    DB 10.2.03.0

    Y at - it notice, that we can use to find data files belong to the backup piece. We can query the handle in order to find the name of the element.

    Hare krishna

    Hi Amit,

    Y at - it notice, that we can use to find data files belong to the backup piece.

    In fact, you have to join the three points of view in a sql against the target:
    Select p.handle, d.name
    Of
    v$ element_sauvegarde p,.
    v$ backup_datafile bd.
    v$ datafile d
    where p.handle = "& manage.
    and bd.set_stamp = p.set_stamp
    and bd.set_count = p.set_count
    and bd.file # d.file = #.
    /
    Rgds,
    Tycho

  • How to search between dates (date ranges)

    Is this possible in APEX to search between dates (date ranges) records in a report page? Like "DATE between P5-DATE AND SYSDATE? Thanks in advance.

    This might work:

    SELECT secuencia_pk, nombre_accidentado, num_caso_legal, numero_reclamante,
           num_seguimiento, status, descripcion
      FROM djur_registro
     WHERE INSTR (nombre_reclamante, NVL (:p2_nombre, nombre_reclamante)) > 0
       AND INSTR (nombre_accidentado, NVL (:p2_nombre_acc, nombre_accidentado)) >
                                                                                 0
       AND INSTR (num_caso_legal, NVL (:p2_num_legal, num_caso_legal)) > 0
       AND INSTR (numero_reclamante, NVL (:p2_num_reclamante, numero_reclamante)) >
                                                                                 0
       AND INSTR (num_seguimiento, NVL (:p2_num_segui, num_seguimiento)) > 0
       AND INSTR (descripcion, NVL (:p2_descripcion, descripcion)) > 0
       AND fecha_ocurrencia BETWEEN NVL (:p2_fecha_desde, fecha_ocurrencia)
                                AND NVL (:p2_fecha_hasta, SYSDATE)
    

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • How to find date of creating index?

    How to find date of creating index?

    You query all_obejcts and you will find last_ddl_time when is - it has changed...

  • SQL to generate the intervals from date of 6 months each, between two date ranges

    Hi all

    I looked in the forums, if someone uses CREATE_CHUNKS_BY_SQL for dates, but no luck.
    I want to update a table using pieces of dates.
    I need to generate date ranges to divide them by pieces.

    I have a table where I know that max (sales_date) and min (sales_date).
    Lets say max (sales_date): min (sales_date) 01/01/2008: 31/10/2010

    I want to break in intervals of 6 months (180 days) as below:
    chunk_id     start_date     end_date
    --------     ----------     --------
      1          01/01/2008     06/30/2008
      2          01/07/2008     12/31/2008
      3          01/01/2009     06/30/2009
      4          01/07/2009     12/31/2009
      5          01/01/2010     06/30/2010
      6          01/07/2010     10/31/2010
    He didn't exactly finish end of the month. Basically, I need these beaches of dates at apart 180 days.

    I appreciate if someone can throw some ideas on this.

    Thank you
    Raj.

    Hi, Raj,

    Sorry, it is unclear what you are asking.

    To generate a list of dates starting with min_sales_date and including all the 180 days after that up to (but not beyond) max_sales_date:

    WITH     got_params     AS
    (
         SELECT     DATE '2008-01-01'     AS min_sales_date
         ,     DATE '2010-10-31'     AS max_sales_date
         FROM     dual
    )
    SELECT     min_sales_date + (180 * (LEVEL - 1))     AS grp_start_date
    FROM     got_params
    CONNECT BY     LEVEL <= CEIL ( ( (max_sales_date - min_sales_date)
                                    + 1
                           )
                         / 180
                         )
    ;
    

    Output:

    GRP_START_D
    -----------
    01-Jan-2008
    29-Jun-2008
    26-Dec-2008
    24-Jun-2009
    21-Dec-2009
    19-Jun-2010
    

    December 16, 2010 is 180 days after June 19, 2010, but it is not displayed, because is after max_sales_date, which is 31 October 2010.

    I hope this helps you.
    Whenever you have any questions, post a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data.

  • Count the hours between the times of the day

    Hello

    It is a timesheet, calculation of payment:

    I'm trying to find a way to calculate how many hours is between two specific times of the day.

    I enter a start time and an end time (in 2 different items), I calculate the number of hours that is. What I can understand.

    Then I need to know how many hours is between 16:00 and 22:00.

    The reason is that there is an additional extra payment for those hours.

    So: "payment on time' X ' total hours work in a day ' + 'bonus' X ' hours between 16 and 22" = "total wages for a day" "»

    Thank you

    Enter the full date and time in columns A and B (for example ' 12 Sep 2016 8:00 AM "or you like the what ever valid date time value):

    C2 = B2−A2

    D2 = C2−DURATION (0, 0, 24 × MAX (TIMEVALUE "(04:00 PM)") −TIMEVALUE (A2), 0)) −DURATION (0, 0, 24 × MAX (TIMEVALUE (B2) −TIMEVALUE (' 22:00 "" "), 0))

    Select cells C2 and D2, copy

    Select cells C2 at the end of column D, dough

    If you prefer the values in column D as decimal hours use the formula:

    dur2hours (D2)

    or replace the formula earlier as follows:

    D2 = dur2hours (C2−DURATION (0, 0, 24 × MAX (TEMPSVAL ("04:00 PM") −TIMEVALUE (A2), 0)) −DURATION (0, 0, 24 × MAX (TIMEVALUE (B2) −TIMEVALUE (' 22:00 "" "), 0)))

  • To add totals in a certain date range

    I have 3 sheets. Income, expenses and then an annual journal (has twelve columns, one for each month). Is there a way to get the numbers to add totals to a column of the spreadsheet of spending within the date range 01/01/16 and 31/01/16 and put the total in a cell in January on my sheet of each year. I can't understand a formula so that it can find the date range. I get a synyax error message.

    Assumptions:

    Your TABLES (not the leaves) are named income, spending and summary. Here is any other tables in the document with these names.

    Dates of expenditure are in column A of the table expenses. Other than the header line, all the entries in this column are values Date and time that have been entered as dates only.

    The amount for each item of expenditure is in column C of the expense table.

    Line 1 of the analytical table is defined as a header line.

    January is in column A of the summary table.

    Summary::A1 cell contains the date January 1, 2016, but can be formatted to display only the name of the month or the month and year. (but see the note below) *.

    Enter the formula in the cell that will contain total expenditures recorded with dates in January 2016 below:

    = SUMIFS ("Expenses: Expenses, $C: $A," > = "& A1, Expenses: $A," < = "& EOMONTH(A1,0))

    Example: All the amounts of expenditure were reduced to 1.00 simple confirmation of funds.

    * NOTE: The formula has previously worked with the format of the cells in the row 1 Summary defined to show only the month and the year (two digits) of the effective date values (the first day of the month indicated), but the table I built tonight January 1, 2015 to the format to display 16 Jan, one was interpreted as January 16 (2016) , and SUMIFS formula did not include not January 1 to January 14 numbers in January total.

    A custom, displaying the month (short or long) and the year (four digits) or a custom format shows only the name of the month (short or long) gave good results.

    Note that any format under control of the display, the effective date is the first of the month displayed.

    Table built and tested in Numbers ' 09 (v 2.3)

    Kind regards

    Barry

  • AMOUNT of Oracle with the date range

    Hello community,

    I'm having a problem with the addition of a field with a date range. It comes to my table

    JVREFVARCHAR210------
    SOURCEVARCHAR22------
    PERIODVARCHAR26------
    JVDATENUMBER-380-Nullable--
    GLCODEVARCHAR224------
    DESCRVARCHAR240---Nullable--
    AMOUNT_0FLOAT4848--Nullable--
    AMOUNT_1FLOAT4848--Nullable--
    JVTYPEVARCHAR24

    and I'm glad the the following statement works as expected

    SELECT AMOUNT_1 FROM 'TABLE' where

    TO_DATE ("PERIOD, ' YYYYMM") > = to_date ("'201501 ',' YYYYMM")

    and

    TO_DATE (PERIOD, 'YYYYMM') < = to_date ("'201502 ',' YYYYMM");

    E.g.

    AMOUNT_1

    56192.48

    59863.57

    48570.1

    72407.12

    21626.96

    35532.96

    75860.67

    25623.62

    54799.83

    16872.3

    The next thing I want to do is the sum of these amounts... so I changed my statement to become

    SELECT SUM (AMOUNT_1) 'TABLE' where

    TO_DATE ("PERIOD, ' YYYYMM") > = to_date ("'201501 ',' YYYYMM")

    and

    TO_DATE (PERIOD, 'YYYYMM') < = to_date ("'201502 ',' YYYYMM");

    and now I'm getting

    ORA-01841: (full) year must be between-4713 and 9999 and not 0

    I also tried

    SELECT THE PERIOD (AMOUNT_1) SUM OF "BRE". "' OPW_NMLTRX ' where

    TO_DATE ("PERIOD, ' YYYYMM") > = to_date ("'201501 ',' YYYYMM")

    and

    TO_DATE (PERIOD, 'YYYYMM') < = to_date ("'201502 ',' YYYYMM")

    Group by PERIOD

    with the same results... I can't figure out what I should do next?

    Thank you.

    Hello

    Solomon Yakobson says:

    Question:

    SELECT *.

    From your_table

    WHERE the TO_NUMBER (SUBSTR (PERIOD, 1, 4)) NO BETWEEN-4713 and 9999

    OR TO_NUMBER (SUBSTR (PERIOD, 1, 4)) = 0

    /

    To find the offending rows.

    SY.

    This can cause other errors, according to what is in this column.  A better way would be something like:

    Primary_key SELECT, period - add more columns you want

    'TABLE' - avoid names which need quotation marks

    (Period WHERE the TRANSLATION)

    '012345678'

    '999999999'

    ) <> = "999999"

    OR SUBSTR (period, 1, 4), not BETWEEN "1900" AND "2099"

    OR SUBSTR (period 5) NOT BETWEEN '01' to '12'

    ;

    Now there may be errors of conversion, because there is no conversion.

Maybe you are looking for

  • 10.11.5 OS finder opens, then disappears

    THW first time after a reboot, I click the Finder icon in the dock, a window swooshes out and then poofs away. The next time I click the icon, nothing happens at all. I can do a finder window by right clicking and selecting new Finder window for the

  • My offices are reorganizing after that the screen saver is running

    Hi all I encountered a problem with El Capitan that I lived for a while and don't have only recently started to nail.  Every once in a while (and), my virtual workstations will reorganize.  I have three desktops that I keep open at work all the time.

  • cards do not sync contacts

    Help! With the help of MAC (OS X El Capitan, v 10.11.12), cards in my Contacts get screwed up.) Use us iCloud and Contacts started maintaining different cards on my Mac and on iCloud - but there is no way to know what contacts does. I merged contacts

  • Cannot reset iMessage to a new number?

    I tried all the tricks on the support site and the positions in this community... I live in the Mexico and had a chip Telcel and Movistar with a new number, and now no matter what I do to troubleshoot it, the old number appears. Has anyone found it?

  • Error message: since Windows was first activated on this computer, the computer hardware has changed significantly.

    original title: reactivation I just got this message: since Windows was first activated on this computer, the computer hardware has changed significantly.  Because of these changes, Windows must be re-activated in 2 days.  You want to reactivate Wind