>>
>>I'm not sure wshat is causing the problem- I've never run into it because I have never tried to create a view with a GROUP BY clause. If your view does not need to be updatable, why not just use a plain ol' SQL query?
>
>PMFJI-
>
>I can think of two reasons:
>
>1. Wants the query to run on the back end(performance).
A view is NO different from SQL here. If it is local data, the query NEVER runs on the backend anyway. If it is remote data, SPT will accomplish the same thing as a remote view (they are internally the same thing)
>2. Doesn't want to have to grab the entire data set, only the grouped dataset(network traffic).
With VFP data, this is not an issue because you can't control it. And I never said that you can't use a parameter in an SQL Query:
lnID = 12345
SELECT * FROM MyTable WHERE SomeID = lnID INTO CURSOR MyCursor
Neither of these reasons is valid. IMO, local views are used entirely too much, sometime just for the sake of using them. I use 2 questions when deciding whether to use a local view or plain SQL:
Does the dataset need to be updatable?
Am I using this same query all over creation?
If the answer to these is no, then there is no need for a view. Even if the first is no, and the second is yes, an argument can be made for using a query in a prg (qpr) instead.
Erik Moore
Clientelligence