People people people :)

I have seen casting, converting, date-diffing, LIKE'ing,
MONTH()/Day()/Year()'ing.... Please do not run functions on your
date/time fields. Running a function on a column in general is extremely
slow. Date/time stamps can be used quite nicely with out them:

DECLARE @date DATETIME;
SET @date = '04/14/2006';

SELECT *
FROM [TABLE]
WHERE
date_created >= @date 
AND
date_created < (@date + 1)


Notice that I comparing the "date_created" to the set date and also that
it is LESS than the set date PLUS one (the next day). This is going to
perform a 100 times better than any function you call on the date
column.

......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274426
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to