Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 15th, 2003, 09:46 AM
mccray_26 mccray_26 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Memphis
Posts: 6 mccray_26 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to mccray_26
SQL Plus Query question

I am doing a data scrub query and I have most of it done except the following:
I need to exclude all patients that have had a first shipment one month prior to the date this report will run.

Please help!

Reply With Quote
  #2  
Old December 15th, 2003, 12:24 PM
cconstantine cconstantine is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 60 cconstantine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 27 sec
Reputation Power: 5
WHERE...

patients.first_ship_date >= ADD_MONTHS(sysdate, -1)

obv, left col has to be your own table and column, and the col must be an Oracle DATE data type. If it's a string containing some date representation, then wrap it with Oracle's TO_DATE(table.the_column, 'mm/dd/yyorotherformatspecifier')

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > SQL Plus Query question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT