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:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old September 15th, 2004, 11:33 PM
spud311311 spud311311 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: Australia
Posts: 37 spud311311 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 13 m 4 sec
Reputation Power: 5
Smile whats wring with my SQL again (BASIC)

if i need to select a bunch of rows from a cloumn date_to where the month is JAN how can i achieve this regardless what year it is .

so far i have

where booking.date_to=to_char('%JAN%', 'DD-MON-YY');

if any one could tell ,me if im on the right track that would be great !!

Reply With Quote
  #2  
Old September 16th, 2004, 06:26 AM
yan_can yan_can is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 1 yan_can User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by spud311311
if i need to select a bunch of rows from a cloumn date_to where the month is JAN how can i achieve this regardless what year it is .

so far i have

where booking.date_to=to_char('%JAN%', 'DD-MON-YY');

if any one could tell ,me if im on the right track that would be great !!



Try to_char(to_date(<somedate>),'MM')

Reply With Quote
  #3  
Old September 16th, 2004, 07:38 AM
shafique shafique is offline
Senior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 305 shafique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 5
Try that,
where booking.to_char(to_date(date_to,'DD-MON-YYYY'),'MON')='JAN'

Reply With Quote
  #4  
Old September 21st, 2004, 07:17 AM
santosh_pai santosh_pai is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 14 santosh_pai User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
try
where ltrim(rtrim(TO_CHAR(booking.date_to,'MON')))='JAN';

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > whats wring with my SQL again (BASIC)


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