Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
People & Phones tables problem
Message
 
 
To
16/05/2008 08:21:28
General information
Forum:
Visual FoxPro
Category:
Stonefield
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01315983
Message ID:
01317596
Views:
9
>Hi Naomi.
>
>>One more suggestion - please add ability in the configuration utility to highlight multiple objects. I need to remove several objects from the Data Dictionary (they are empty tables) and I have to do it one by one.
>
>I'll add that to the ER list.
>
>>But I now can not edit SQL in the VFP window. There is no zoom option (it was in the previous version).
>
>We had to drop that because all Stonefield Query windows now have Desktop set to .T. (so they work properly with _SCREEN.Visible .F. and so they work correctly in Vista) and you can't open a PRG window from a modal Desktop form (well, you can, but it really, really sucks).
>
>>This SQL
>>
>>select PEOPLE.LNAME,PEOPLE.FNAME, Phones_Home.Home_Phone,Phones_Office.Office_PHONE from People LEFT JOIN (select People.cID, Phones.Phone as Home_Phone from People LEFT join Phones on People.CID = Phones.CID and Phones.Type IN (space(20),'Home') ) Phones_Home ON People.cID = Phones_Home.cID LEFT JOIN (select People.cID, Phones.Phone as Office_Phone from People LEFT JOIN Phones on People.CID = Phones.CID and Phones.Type = 'Office' ) Phones_Office on People.cID = Phones_Office.cID order by 1, 2
>>
>>produces a syntax error. Do you know what may be wrong?
>
>Try executing that in VFP and see what happens.
>
>>The simpler select should be
>>
>>select P.LastName,P.FirstName, Ph1.Home_Phone, Ph2.Office_Phone... from People P
>> Left JOIN (select cID, Phone as Home_Phone from Phones
>>where Type in ... and Phone <> space(60)) Ph1
>>on P.cID = Ph1.cID LEFT JOIN () Ph2 ...
>>
>>So, perhaps I can go with subtables if they allow to introduce filter condition.
>
>Yes, subtables allow filters. The way a subtable works is that just before we send the SQL statement to the data engine, we change something like:
select SomeField from SomeSubTable
to:
select SomeField from OriginalTable SomeSubtable
Hi Doug,

Thanks. I'm wondering if the generated statement would be correct then.
In my case the subtable should really be like a derived table. Anyway, if the SQL would not be correct I'll try to adjust it and hopefully I would finally be able to produce this report.

Hopefully the rest of the reports would be easier.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform