Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper syntax for a double outer join?
Message
From
04/12/1998 13:30:11
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00164169
Message ID:
00164171
Views:
35
The View Designer dies with multiple JOINs. You are going to have to preface the SQL statement with :

CREATE SQL VIEW myview AS {put SQL here}

You're not going to be able to reload the resulting view into View Designer without blowing it up.


>I have a table A that has child records in Table B or Table C. Table B and C are basically the same structure and mutually exclusive (I'm merging two old systems.)
>
>So, when I wrote the SQL for a summary view in the View builder it created this:
>
> SELECT A.field1, ...;
> FROM A;
> LEFT OUTER JOIN B;
> LEFT OUTER JOIN C;
> ON A.field1=B.field1;
> ON A.field1=C.field1;
> GROUP BY A.field1
>
>But this either takes two days or simply doesn't work on tables of only 20-100 thousand records each. I didn't wait to find out.
>
>So, playing with the SQL code I changed it to:
>
> SELECT field1, ...;
> FROM A;
> LEFT OUTER JOIN B;
> ON A.field1=B.field1;
> LEFT OUTER JOIN C;
> ON A.field1=C.field1;
> GROUP BY A.field1
>
>This was quick (enough) and appears to work just fine. But I need a view, not a Query. So how do I get this back into by View SQL?
>
>Any comments regarding why my SQL is wrong or how to get my view to accept it would be appreciated.
>
>Thanks in advance.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform