Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This Select Group claims to be Missing or Invalid
Message
From
06/09/2007 20:54:24
 
 
To
06/09/2007 14:18:45
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01252346
Message ID:
01252908
Views:
24
>>>>The memo field is not allowed in the group by but is also not allowed in the result set. (this one bit me recently as well ) It would be meaningless in any case, unless it is the same for every record.
>>>
>>>Thanks for helping me with this clarification. Because the memo fields were from the 'child' linked table, they were the same. This will be one for the memory bank.
>>
>>You might try MAX(memofield). Ran into that recently but can't remember if it worked or not.
>

Yeah, but it is an old workaround if all the values are the same for the set but you can't use the field in the group by reliably. I'd only use it in view where you might have to grab it all in one pull. In method code I'd just join it back in after the first select.

( I've only run across it in apps I'm converting for others. Don't use it myself as the stricter group by makes sense to me. )

>MAX() of a character column where all the values are known to be the same just seems "incoherent", doesn't it? ;)


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Previous
Reply
Map
View

Click here to load this message in the networking platform