General information
Category:
Coding, syntax & commands
>>>
>>>SELECT * FROM Quotes WHERE ;
>>> DTOC(Date)+Customer IN ;
>>> (SELECT MAX(DTOC(Date))+Customer FROM Quotes)
>>
>>Yes, but you still have two SQL-SELECTs (even if one is embeded). Still, yours should be faster than 2 separate SELECTs.
>>
>I left off the GROUP BY in the above statement. Sorry. It was late. I'll use that as an excuse.
>Anyway it should have been
>
>>SELECT * FROM Quotes WHERE ;
>> DTOC(Date)+Customer IN ;
>> (SELECT MAX(DTOC(Date))+Customer FROM Quotes GROUP BY Customer)
:) Yes, it was obvious! :)
>I don't know about the speed of nested selects vs. seperate selects.
>But as you said I think the single statment would be faster.
I never found a case when the embeded is slower then separate.
Vlad
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only