Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is one way more efficient than the other
Message
General information
Forum:
Microsoft SQL Server
Category:
Database management
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01333475
Message ID:
01333487
Views:
9
Borislav,

Thanks for the answer and your advice. I was aware of your statement with the times.

I checked the execution plan and saw a table scan due to the where clause on the date field and thought maybe one method was better than the other (although I didn't think so).

Bob

I will need to look at this
>What is the execution plan?
>I think both are equal for SQL Server so no matter you will use the execution plan should be the same.
>One thing:
>If you store time potion in that datetime field and you want date between 01/01/2008 and 01/31/2008 you have to use:
>
>SELECT ...
>       FROM ...
>WHERE DateTimeField >= '20080101' AND --- 01 Jan 2008
>      DateTimeField <  '20080201'     --- 02 Feb 2008
>
>Just because 01/31/2008 01:03:00.111 is bigger than just 01/31/2008.
Previous
Reply
Map
View

Click here to load this message in the networking platform