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 April 19th, 2005, 08:55 AM
pomp850 pomp850 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 27 pomp850 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 10 m 25 sec
Reputation Power: 0
Comparing the "date" (omitting the time)

Hello,

I need everyones help. The query below works, but it does not retrieve a row that is = to the sysdate. The reason is because it also uses the TIME to compare the with the sysdate. Can someone show me how to write a sql to omit the time from the date in the date column. Thanks!

SELECT * FROM MYTABLE WHERE date >= sysdate;

Reply With Quote
  #2  
Old April 22nd, 2005, 04:17 PM
wubandit99 wubandit99 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 30 wubandit99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 6 m 31 sec
Reputation Power: 4
use trunc() on both sides of the equation....

select *
from myTable
where trunc(date) >= trunc(sysdate);

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Comparing the "date" (omitting the time)


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