>>>CREATE SQL VIEW CALLBACK AS ;
>>>>SELECT ALL Servcalls.*, Customers.company;
>>>> FROM appdata!servcalls LEFT JOIN appdata!customers ;
>>>> ON Servcalls.prim_key = Customers.prim_key ;
>>>> GROUP BY Servcalls.prim_key;
>>>> ORDER BY Servcalls.callbacktime
>>>
>>>
>>>Hi James,
>>>
>>>Does your table 'Servcalls' have lots of records but only two distinct customer id's ?
>>>
>>>If so, remove the GROUP BY clause from the SELECT and run it. Ideally, you should be running a GROUP BY expression only if there is an aggregate field in your SELECT statement. There does'nt seem to be one.
>>>
>>>I know Philip Pastor mentioned that, but his SELECT statement had an INNER JOIN which would exclude all record id's (if there are others) which do not have a corresponding record in Servcalls; Servcalls being the child table.
>>>
>>>Hope it helps.
>>
>>Thanks Sanjay
>>
>>Removing the "GROUP BY" did work. However, I'm about to give up on views to populate a grid in favor of cursors.
>>
>>I'm using about 4 grids on separate page frames, each filtered to show different information from the same table.
>>
>>When using views - to requery the view, I have to re-use it or (recreate it, which seems to create another table) and neither method repopulates my grids.
>>
>>Do you have any suggestions as to the use of Views Vs Cursors from local tables? Which is best when?
>>
>>Thanks again,
>>-Curtis (I work for Jim)
>
>
Curtis,
>You could use views or plain SQL cursors to populate grids. However if buffering wouldn't be a problem there are faster easier ways. Use your table again in DE with different aliases. In each of "child" grids (subsets) set linkmaster, childorder and relationalexpr properties. Set order of "child" aliases to the ones that link to master. This relieves you from overhead of requeries. You could even just "set key" instead of setting linkmaster, childorder, relationalexpr properties.
>Cetin
>Cetin
Thanks Cetin,
Your Idea sounds like the best of all.
I'm going to give it a try.
-Curtis
- jim durkin
"The universe is a big place, perhaps the biggest." Kurt Vonnegut