OK, I've got one query that was written by someone else that goes one way. When
I run it directly in the SQL2000 interface, it gets turned into the second
version below. Is the second more efficient? It doesn't look like it is...
SELECT COUNT(itemnum) AS isComplete
FROM items
WHERE itemnum = 739434311
AND (dynamic = 0 AND date_end <{ts '2003-06-28 23:12:47'} OR status =
0)
SELECT COUNT(itemnum) AS isComplete
FROM items
WHERE (itemnum = 739434311) AND (dynamic = 0) AND (date_end <
CONVERT(DATETIME, '2003-06-28 23:12:47', 102)) OR
(itemnum = 739434311) AND (status = 0)
Bottom line question: Is the second query more efficient and why?
Thanks
Michael Dinowitz
Finding technical solutions to the problems you didn't know you had yet
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=6
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=6
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm