Welcome Guest ( Log In | Register )


 
 
 
 
 
 

 
 
Oracle 

Performance Tuning Reference poster
 
Oracle training in Linux 

commands
 
Oracle training Weblogic Book
 
Easy Oracle Jumpstart
 
Oracle training & performance tuning books
 
Burleson Consulting Remote DB Administration
 
 
 
Reply to this topicStart new topic
> Need WHERE clause to filter last day in month; and second Friday in month
pstein
post Aug 4 2017, 02:23 AM
Post #1


Newbie
*

Group: Members
Posts: 6
Joined: 25-February 07
Member No.: 7,170



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
Go to the top of the page
 
+Quote Post
burleson
post Aug 4 2017, 08:34 AM
Post #2


Advanced Member
***

Group: Members
Posts: 13,492
Joined: 26-January 04
Member No.: 13



Hi Peter,

The dates are easy in SQL:

I have lots of examples here:

http://www.dba-oracle.com/t_date_arithmetic.htm

Also see specific examples here:

http://dba-oracle.com/googlesearchsite_pro...7850j4684026j16

Good luck!


--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd August 2017 - 02:24 AM