1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Need where clause to filter last day in month; and second friday in month

Discussion in 'SQL PL/SQL' started by pstein, Aug 4, 2017.

  1. pstein

    pstein Starter

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    10
    Location:
    Germany
    Assume I have a table "mytable" with (among others) a DATE column labelled "mydate".

    Now I am searching for WHERE clauses for the following filters:

    1.) How do I find all rows where the date value represents the last day in month?

    2.) How do I find all rows where the date value is the second friday in month?

    3.) How do I find all rows where the date value is the 10th of a month?

    Thank you
    Peter
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,496
    Likes Received:
    356
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Last edited: Aug 4, 2017
  3. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    702
    Likes Received:
    140
    Trophy Points:
    830
    Location:
    Russian Federation
    Hi.
    Are you learning the oracle sql ?
    Few a simple recommendation for successful effective learning and training yourself as an expert(in the future) :
    1) studing/reading the documentation,books and etc..
    2) create test examples , learn to understand the parts and the only way you will get your own experience ))

    What is needed for solve your questions....

    0) single-row function
    1) these functions last_day , trunc is needed for resolving your task
    2) see to item 0
     
    Last edited: Aug 9, 2017