How to get him between dates

Hai All

How to find dates between two the date (FromDate to date)

And how to find in other words there is no Sunday and how neglect it


Thanks in advance

Srikkanth

bluefrog wrote:
where Day_of_Week! = 1

@Bluefrog
Day of the week is based on NLS_Territory and it will change for the different territories. As a result, we cannot count on that.

PRAZY@11gR2> select * from v$nls_parameters where parameter = 'NLS_TERRITORY';

PARAMETER                                                        VALUE
---------------------------------------------------------------- ---------------------
NLS_TERRITORY                                                    AMERICA

Elapsed: 00:00:00.04
PRAZY@11gR2> select sysdate-level,to_char(sysdate-level,'DAY'),to_char(sysdate-level,'D') from dual
  2  connect by level<=7;

SYSDATE-L TO_CHAR(S T
--------- --------- -
18-MAY-10 TUESDAY   3
17-MAY-10 MONDAY    2
16-MAY-10 SUNDAY    1
15-MAY-10 SATURDAY  7
14-MAY-10 FRIDAY    6
13-MAY-10 THURSDAY  5
12-MAY-10 WEDNESDAY 4

7 rows selected.

Elapsed: 00:00:00.03
PRAZY@11gR2> alter session set nls_territory='FRANCE';

Session altered.

Elapsed: 00:00:00.01
PRAZY@11gR2> select sysdate-level,to_char(sysdate-level,'DAY'),to_char(sysdate-level,'D') from dual
  2  connect by level<=7;

SYSDATE- TO_CHAR(S T
-------- --------- -
18/05/10 TUESDAY   2
17/05/10 MONDAY    1
16/05/10 SUNDAY    7
15/05/10 SATURDAY  6
14/05/10 FRIDAY    5
13/05/10 THURSDAY  4
12/05/10 WEDNESDAY 3

7 rows selected.

Elapsed: 00:00:00.03

For the day of America at the beginning of the week from Sunday and the France is Monday ;)

@OP,
Try this instead.

with T as  (
select trunc(sysdate-20) start_date,trunc(sysdate) end_date from dual
)
--
--End of sample data
--
select sum(case when to_char(start_date+(level-1),'DY') != 'SUN' then
1
end)
total_days
from t
connect by level <= (select end_date-start_date+1 from T)
/

TOTAL_DAYS
----------
        18

Elapsed: 00:00:00.04

Kind regards
Prazy

Tags: Database

Similar Questions

  • How to get back my data for the health and the watch Apps once I've restored my phone?

    How to get back my data for the health and the watch Apps once I've restored my phone?

    From the backup, you're going to be restoration.

    If you back up to iTunes, make sure that it is an encrypted backup.

  • My watch clock: 2012,03,2012 at 20:10. How to get back the Date please.

    My watch clock: 2012,03,2012 at 20:10.  How to get back the Date please.

    http://www.ehow.com/how_2052285_change-time-date-Windows-XP.html

    http://support.Microsoft.com/kb/307938

    UTC/GMT is 20:12 on Friday, February 24, 2012

  • How to get the last date of 3 days for the current month?

    Hello. Guy

    How to get the last date of 3 days for the current month?

    MY OUTPUT WOULD LOOK LIKE THIS

    JANUARY 29, 2016

    JANUARY 30, 2016

    JANUARY 31, 2016


    GUYS HELP ME / / /...

    SQL > select last_day (sysdate) - level + 1 double connect by level<= 3="" order="" by="">

    LAST_DAY)

    ---------

    29 JANUARY 16

    30 JANUARY 16

    31 JANUARY 16

  • How to get the contact data of old hard drive?

    A friend's mother died.  He would like to get contact details.  He says that he "kept everything in Internet Explorer." I can't understand this... was it really store in Outlook?  I got the hard drive of the machine and it attached to my laptop under drive H.  How can I recover the data?

    I would ask him what email he used; It is possible that he was using a webmail (gmail, hotmail, etc.) and has been updated and access to contacts and mail via Internet Explorer, and it don't realize may not be not that they were stored on the webmail site and were not yet on his hard drive. Another possibility is Contacts in C:\Users\username\Contacts, but that don't rely on Internet Explorer.

  • How to get the current date to display in the Spanish format.

    The coding is in format Adobe Acrobat, DC. The coding I have for the English today's date is:

    var d = new Date();

    sDate = util.printd var ("dd mmmm yyyy", d);

    this.getField("Text1").value = sDate;

    How can I get the current date displayed in this Spanish format: 07 December 2015

    Thank you

    It's a little complicated... But this code should do the trick:

    util.printd("dd", d) + " de " + util.printd("date(es){MMMM}", d, true) + " de " + util.printd("yyyy", d);
    

    Edit: Fixed the code... Did not notice the 'of' second before.

  • How to get the path data graphics (M, L, Q, etc...)?

    I have a shape on the stage and I want to get its graphics data (M, L, Q, etc), I tried the readGraphicsData method, but I could not find the data path & orders!

    var stage_shape: Shape = this.getChildAt (0) as a form;

    var v: vector. < IGraphicsData > = stage_shape.graphics.readGraphicsData (false);

    trace (v);

    output: [object GraphicsSolidFill], [GraphicsPath object], [object GraphicsEndFill]

    trace (v [1]);

    output: [object GraphicsPath]

    Then. How to get path data (178,5 M157.55 Q273.7 188.45 392,5 178,5 L392.5...)?

    Thank you.

    var stage_shape: Shape = this.getChildAt (0) as a form;

    var v: Vector. = stage_shape.graphics.readGraphicsData (false);

    trace (v);

    output: [object GraphicsSolidFill], [GraphicsPath object], [object GraphicsEndFill]

    trace (GraphicsPath(v[1]). Data);

  • How to get the numeric date on reviews, no positions.

    Hello

    Can someone tell me how can I get a digital date on my blog comments? date is currently like 'may 25, 2015', and I wish it were "25/05/2015".» I went into the code and saw that the use of this tag "{tag_usagedate}", I managed to fix this for the blog because there is this tag: "{tag_blogpostmonthnumeric}", how can I do the same thing for comments date? " I need to do this because my site is in Portuguese, and it's the only way I found the date of the translation. Unless someone can teach me what are these tags and how can it change directly in their table of months for something like {'February', 'Marco', 'Janeiro', 'April',..., 'December'}. Any help is appreciated.

    Thank you

    Alex.

    To do this I use liquid, make sure it is enable on your site, something as it does the job, maybe someone should check the syntax.

    {{date | date: ' %d-%m - yyyy "}} for all numeric values, but {{date | date:"%d - MMM-yyyy"}} should return the date with the month names in your culture.

    Look here the Developer Reference for all filters.

  • Satellite A110-195: screen hit-&gt; how to get him back?

    Hello

    I have a new Satellite A110-195 notebook and the screen turned sideways. Instead of the screen being vertical, it is now horizontal and I now to see/read everything with my head called a left corner. I can assure you this very painful way to look at the screen!

    Is there anyone who can advise me how to get the screen back to normal?

    Thank you.

    It seems that you simply accidentally pressed and activated on the screen rotation.
    Try to use the CTRL + ALT and upwards or LEFT or down or to the RIGHT.

    The keys left, down, right will turn the display of 90, 180, or 270 degrees.

  • How to get him Active Directory users and computers that are running on 64-bit Windows 7

    I have windows 7 ultimate 64 bit installation.  I need to download to get him Active Directory users and computers users and computers to manage the windows 2003 server environment.  Used to use AdminToolpack2003, but that does not work on my version of Windows 7.

    Hi Trickymonk,

    You can download it from the link: for Windows 7 Remote Server Administration Tools: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d

    For a similar question, see the link: http://social.technet.microsoft.com/Forums/en-US/w7itproappcompat/thread/a0b24e31-0290-415b-8448-c367bde3e2c9/

    Thank you, and in what concerns:
    Swathi B - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to get the old data 6 months from the current date?

    Hi friends,

    I have a table which includes historical data, which are having more than 1 years old data. The historical table gets updated once a week. My requirement is that I should get the latest data from the week of each month for 6 months according to the current data. I use oracle 10g.

    Can you please someone help in this.

    Thanks in advance

    SELECT last_day (ADD_MONTHS (TRUNC (SYSDATE, 'mm'),-LEVEL))-7 start_dt.
    LAST_DAY (ADD_MONTHS (TRUNC (SYSDATE, 'mm'),-LEVEL)) end_dt
    OF THE DOUBLE
    CONNECT BY LEVEL<=>

    change as a result, I have provided you the start and end dates for your logic...

  • How to get midnight trip data

    Hi all

    I want to extract data from a table that stores work shifts. The query is able to recover data for all trips except for midnight falling between two days. as - 2300-0700 hrs or 2200-0600 hours. I use UTC and I use (start_tm < = to_char (SYS_EXTRACT_UTC (CURRENT_TIMESTAMP), 'hh24mi') )

    and end_tm > = to_char (SYS_EXTRACT_UTC (CURRENT_TIMESTAMP), 'hh24mi'))

    here what other conditions can I use who would get me midnight too, even if data that are taken towards midnight. I tried or condition more thereby and adds 1 day but

    It fails.

    Kind regards

    Then you must end_tm included:

    WHERE)

    start_tm< end_tm="" --="" with="" same="" day="">

    AND

    start_tm<= to_char(sys_extract_utc(current_timestamp)="" ,'hh24mi'))="" --="" from="">

    AND                                                                    -- to

    end_tm > = to_char (SYS_EXTRACT_UTC (CURRENT_TIMESTAMP), 'hh24mi'))-end_tm

    )

    (OR)

    start_tm > end_tm - today ' hui in the shift of tomorrow

    BTN

    start_tm<= to_char(sys_extract_utc(current_timestamp)="" ,'hh24mi'))="" --="" from="" start_tm="" to="">

    OR                                                                    -- or

    end_tm > = to_char (SYS_EXTRACT_UTC (CURRENT_TIMESTAMP), 'hh24mi'))-midnight at end_tm

    )

    )

    SY.

  • How to get the current date in script sqlloader

    I have a sqlloader script that loads data into a table with apparently a large number of columns... my upload script looks like this.
    options (skip=2)
    load data
    badfile 'C:\CAP_SPS\Batchscripts\psafixbad.txt'
    discardfile 'C:\CAP_SPS\Batchscripts\psafixdiscard.txt'
    append
    into table sps_psafix
    when record_layer='Project'
    fields terminated by ','
    trailing nullcols
    (
    record_layer position(1),
    file_name,
    attr1,
    attr2 filler,
    attr3 filler,
    attr4 filler,
    attr5 filler,
    attr6 filler,
    attr7 filler,
    attr8 filler,
    ...
    ...
    read_flag constant '0',
    select current_date from dual
    )
    the last column is a column of timestamp of charge and I want to capture him since the time of execution instead of manually update. But the sqlloader's mistake to say-

    SQL * Loader-350: 268-line syntax error.
    Expected ', 'or') ', found 'current_date '.
    Select current_date double
    ^

    No idea how to pass on the latest date in the field?

    Enjoy your entries.

    Thank you
    Sanders.
    options (skip=2)
    load data
    badfile 'C:\CAP_SPS\Batchscripts\psafixbad.txt'
    discardfile 'C:\CAP_SPS\Batchscripts\psafixdiscard.txt'
    append
    into table sps_psafix
    when record_layer='Project'
    fields terminated by ','
    trailing nullcols
    (
    record_layer position(1),
    file_name,
    attr1,
    attr2 filler,
    attr3 filler,
    attr4 filler,
    attr5 filler,
    attr6 filler,
    attr7 filler,
    attr8 filler,
    ...
    ...
    read_flag constant '0',
    date_column_name SYSDATE
    )
    

    SY.

  • How 2 get d xml data 2 devlp Orcl BI Business Publisher sql qry RPT

    I am new to Oracle BI Publisher Enterprise. To prepare a report of applications Oracle using BI Publisher allows us to obtain the simultaneous release of Oracle reports as XML (thru prg). Then, load the xml into the rtf document and define templt and data definition and rerun the GWP of conc... But in the company Oracle BI Publisher, how do we get the output xml from a sql query. Please bear with my ignorance and help me in this issue
    Thanks and greetings

    Create a new data source and make it as a sql query.
    And run the report, and then select the output in XML format.

    Save this XML and use it to RTF.

  • How to get documents and data to the cloud on my Mac desktop?

    After the upgrade to Sierra all my data (documents and desktop) have been transferred to Icloud. I absolutely not want all my data on another server costs me more money. How do I lose all my data safely back on my Mac, without anything? I'm quite t... o... that the decisions of this importance are make with a single click (or without?). Preferably, I do not want to export every file (of the thousands...) by hand, but just change things back to where it was before.

    Thanks in advance!

    Documents are also in your folder on the drive on your Mac iCloud.

    Just disable iCloud drive in iCloud preferences.

    Then go icloud.com and connect, then you remove the files on disc to iCloud.

    8. how to disable iCloud drive?

    To disable iCloud Drive on your iOS device, go to settings > iCloud > iCloud driveand on your Mac, go to the Apple menu > System Preferences > iCloud. If you disable iCloud drive, so you you will manage your files locally, documents are not synchronized or updated your iOS iOS devices 8 or OS X Yosemite or iCloud.com.

    http://www.iphonehacks.com/2015/01/icloud-drive-Guide.html

Maybe you are looking for

  • H8-1534 how to recover hard drive again

    PC is h8-1534 envy... Hard drive died bought new drive and hang it up, started to recovery cd. The cottage 5 options to chose the recovery, and it happened to 3 options... (1) collect (2) Backup (3) contact support. 1 and 2 were not high informed onl

  • How to backup on DVD under Windows Vista?

    I have windows vista... Last year this time, I made a back up on 3 DVD... This week I'm redo it... I erased all the DVD... and made a return to the top... but it isn't on a single dvd... I missed something... and that was clear an error? Thank you fo

  • The taskbar on the top of my home screen.

    I have a taskbar on the top of my home screen on my Dell INSPIRON 15 laptop, when I restarted yesterday the task bar was gone, he had my webcam, Firefox, recycle bin etc. shortcuts on it and let me know how to get it back please

  • Boston Acoustics BA735 analog input Jack

    (I posted a reply in an old thread, but I think that this was not right, so I'm starting a new.) My low BA735 subwoofer has a digital and an analog input jack. Trying to use these speakers with my Asus Windows 7 laptop, I understand that my laptop re

  • How to use the Add-ons that were previously purchased elsewhere?

    In view of the recent changes with CC 2015 and gradually extensions Manager... How to install and use extensions add-ons that were previously purchased directly by the developer of the extension?I use a large number of both DWZone and DMXzone extensi