There doesnt seem to be any difference.. Other Than

> CONVERT(DATETIME, '2003-06-28 23:12:47', 102)) OR

it gets turned into the second
> version below.
I am not sure of the logic behind having one query.. create another query

Joe Eugene


> -----Original Message-----
> From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 28, 2003 11:32 PM
> To: SQL
> Subject: SQL converted?
>
>
> 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

                        

Reply via email to