dbTalk Databases Forums  

Help! I need to pull out all of the birthdays in a school term

comp.database.ms-access comp.database.ms-access


Discuss Help! I need to pull out all of the birthdays in a school term in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Laphan
 
Posts: n/a

Default Help! I need to pull out all of the birthdays in a school term - 01-25-2009 , 05:06 PM






Hi All

I know this might not make much sense, but I'm hoping you can help!

I have a table consisting of the following:

StudentID StudentName DOB
1 Fred 12-04-1996
2 Brad 01-11-1996
3 Gary 23-12-1996
4 Jill 16-01-1997

I need to do a query so that I get all of the students that have a birth
date that falls between 1 Sept - 31 Dec, 1 Jan - 31 Mar and 1 Apr - 31 Jul.

I tried to do a select StudentName, DOB from Students where day(DOB) & '-' &
month(DOB) > #01-09# and day(DOB) & '-' & month(DOB) < #31-12# order by 2,
but because I've not put a year it's getting everything between 1-9-the
first year to 31-12-the last year.

I need to get everybody between the specified sets irrespective what year
they come in.

Any ideas?

Thanks

Laphan






Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.