Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to simplify sql commands
Message
From
24/01/2000 18:12:37
 
 
To
24/01/2000 18:03:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00320611
Message ID:
00321914
Views:
31
>>>(1) SELECT MAX( ItemDate), TalentId, cItemType ;
>>> FROM vItemTal ;
>>> GROUP BY 2
>>> HAVING cItemType IN ( &lcList )
>>>Note that you cannot use TOP in cases where you also need to GROUP.
>>>
>>#1 is correct. It should be excluded. The problem is when I was tried this originally, it appeared that the cItemType was not matching. Almost as if it was randomly picking the ItemType from the group of records. Eventually, I broke this into two steps.
>
>Are you sure you ran it with this specific syntax, using both the MAX() function and the HAVING clause (not a WHERE clause)? This query should work fine, unless you have multiple records for the same talent on the same date.
>
>-- Randy

Yes. In fact that is the exact sytax I used and I was mystified when it didn't work.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform