Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL INSTRUCTION
Message
From
17/08/1997 04:00:30
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00045112
Message ID:
00045164
Views:
27
>>I Have thre table FILM (Movies), MAGAZZINO (Store), GENERI (Kind of movies),
>>In the table FIELDS there are 2 fields joined with the table GENERI, Genere and Gener2
>>
>>This SQL gives me an error (column gener2 not found) though I can preview it.
>>The error is generated only when I try to save the query and sometimes (not always) when I run it.
>>
>>SELECT Film.titolo, Generi.descriz, Generi_a.descriz,;
>>count( Magazzino.codice), Film.codice;
>>FROM video!magazzino INNER JOIN video!film;
>>INNER JOIN video!generi;
>>INNER JOIN video!generi Generi_a ;
>>ON Film.gener2 = Generi_a.codice ;
>>ON Generi.codice = Film.genere ;
>>ON Magazzino.codifilm = Film.codice;
>>GROUP BY Film.codice
>>
>>Can anyone helps me ?
>>
>>Hope this example would be clear enough
>>
>>Thanks
>>
>>Alessio
>
>I know in the Oracle world of standard SQL that if you use a SQL function on a field [ count(Magazzino.codice) ], you have to do a *Group By* on all other fields that appear in the Select statement. You might try including the first 3 fields in your group by statement as well:
>
>Group by Film.titolo, Generi.descriz, Generi_a.descriz, Film.codice

It doesn't work , and it doesn't give me the output I want anyway.
It works if I delete the table generi_a from the query.
Thanks anyway
Alessio
Previous
Reply
Map
View

Click here to load this message in the networking platform