Hello everybody
I have the following problem:
I've created a Website for a Customer by using MySQL 4.0.x
Now I need to transfer the whole stuff to my Customer's ISP.
The ISP is using MySQL 3.23.x

Now I have the following Query which doesn't work on the 3.23 Server:

SELECT 
hotelstammdaten.id_PK , hotelstammdaten.hotelname , hotelstammdaten.name ,
hotelstammdaten.vorname , hotelstammdaten.strasse , hotelstammdaten.plz ,
hotelstammdaten.ort , hotelstammdaten.bundesland , hotelstammdaten.land 
FROM hotelstammdaten 
INNER JOIN relation_hotelthema ON hotelstammdaten.id_PK =
relation_hotelthema.hotelid_fk INNER JOIN hotelthema ON
relation_hotelthema.hotelthemaid_fk = hotelthema.id_PK 
INNER JOIN relation_hotelausstattung ON hotelstammdaten.id_PK =
relation_hotelausstattung.hotelid_fk 
INNER JOIN hotelausstattung ON
relation_hotelausstattung.hotelausstattungid_fk = hotelausstattung.id_PK 
INNER JOIN relation_hoteldienstleistung ON hotelstammdaten.id_PK =
relation_hoteldienstleistung.hotelid_fk 
INNER JOIN hoteldienstleistung ON
relation_hoteldienstleistung.hoteldienstleistungid_fk =
hoteldienstleistung.id_PK 
INNER JOIN relation_hotelfreizeit ON hotelstammdaten.id_PK =
relation_hotelfreizeit.hotelid_fk 
INNER JOIN hotelfreizeit ON relation_hotelfreizeit.hotelfreizeitid_fk =
hotelfreizeit.id_PK 

WHERE
hotelstammdaten.status = 'aktiv' AND
hotelstammdaten.sterne_fk = '3' AND
hotelstammdaten.ort like 'Bern' AND
(hotelstammdaten.bundesland LIKE 'Oberösterreich' ) AND
relation_hotelthema.hotelthemaid_fk = '2' AND
relation_hotelausstattung.hotelausstattungid_fk IN (50, 96) AND
relation_hoteldienstleistung.hoteldienstleistungid_fk IN (42) AND
relation_hotelfreizeit.hotelfreizeitid_fk IN (5, 34)

GROUP
BY hotelstammdaten.id_PK 
HAVING
count(DISTINCT relation_hotelausstattung.hotelausstattungid_fk) >= 2 AND
count(DISTINCT relation_hoteldienstleistung.hoteldienstleistungid_fk) >= 1
AND
count(DISTINCT relation_hotelfreizeit.hotelfreizeitid_fk) >= 2 


The Error Message I get is:
Unknown column 'relation_hotelausstattung.hotelausstattungid_fk' in 'having
clause'


I can't figure out what is wrong. Can anyone put me in the right direction ?

Regards
Olivier

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to