Matthew Small wrote:
> I think it's just as simple to say
> 
> Select * from table where 
>       date >= '1/1/2005' and 
>       date < '3/1/2005'

The query is, but the way you get there dynamically is not, ecause you 
have to figure out what the next month is.  So if your parameters are 1 
2005 2 2005, you can't just add one to the month to make the query you 
posted, you have to create a date object "2/1/2005" then add a month to 
it using DateAdd()... Not a big deal, but the code is more complex.

Realistically though, that's probably the better way of doing it, 
especially if you've got large amounts of data :)

Simple code is not always the best solution. ;)

  - Rick

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195230
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to