Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
D0LeM1Te
Starting Member
3 Posts |
Posted - 2004-10-05 : 14:30:46
|
Hey,I'm working on a database for my internship which stores information about students registering for a school & the date they registered. My Question is 2 fold1st:I need to make a Query that finds all students that registered within a certain year. The Registration date field's format is MM/DD/YYYY. I tried the two methods pasted beow but they didnt quite work outSELECT *FROM Student_DataWHERE Registration_Date BETWEEN (01/01/2003) And (12/31/2003);& this 1SELECT *FROM Student_DataWHERE Registration_Date BETWEEN (01/01/2003) And (12/31/2003);2nd:The database is run in a form. How do I make it so that the queries are displayed in the form & not in a table?? |
|
JimL
SQL Slinging Yak Ranger
1537 Posts |
Posted - 2004-10-05 : 14:46:58
|
Is the backend access or SQL ?SQL = SELECT *FROM dbo.Student_DataWHERE Datepart(year,Registration_Date) = '2003'Access =SELECT * FROM Student_DataWHERE (((Year([Registration_Date]))=2003));JimUsers <> Logic |
 |
|
D0LeM1Te
Starting Member
3 Posts |
Posted - 2004-10-15 : 09:39:29
|
Thanx alot Jim.. That worked perfectly... I'm still researching how to return the queries into the form. If anyone can point me in the right direction it will be greatly appreciatedKunle |
 |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-10-15 : 09:43:13
|
dates are delimited in Access with #.SELECT *FROM Student_DataWHERE Registration_Date BETWEEN #01/01/2003# And #12/31/2003#- Jeff |
 |
|
|
|
|