By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,806 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,806 IT Pros & Developers. It's quick & easy.

simple question about date compare

P: 121
hi guys,
i have a table with 2 columns as StartDate and Enddate.
and i am writting a query in which one of the condition is
where startdate < enddate ( means stardate can be 01/01/2009 and enddate as 09/01/2009 in dd/mm/yyyy format). as of this time with small database. its not at all a issue, but do u people think that in future when my database grows this style of comparing date can be a problem?

any suggestions.
Apr 20 '09 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 1,134
If you think your database will grow sufficiently that it will become an execution speed problem then you might want to put some thought into
creating appropriate indexes on the fields that will give you the most effective performance boost in relation to your search conditions.
Apr 20 '09 #2

Expert 2.5K+
P: 2,878
Rather than using a function, yes. Comparative statement is still the fastest way to compare dates.

--- CK
Apr 24 '09 #3

Expert Mod 15k+
P: 31,541
In direct response I would say "No." It shouldn't be a problem. As CK says, it's the best way to test this condition.
Apr 25 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.