Information générale
Catégorie:
Codage, syntaxe et commandes
>>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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement