Задавайте вопросы, мы ответим
Вы не зашли.
Имеется запрос необходимо соединить 2 таблицы (orders и restaurants_menu ) при помощи FULL OUTER JOIN, но в результате ошибка:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FULL OUTER JOIN restaurants_menu as m ON o.type_food = m.type_menu WHERE MONTH( ' at line 7
SELECT o.id, o.voucher,o.company,o.type_food, o.code, o.country, o.tourist, o.support, o.drivers, o.arrival_date,o.addition_time, o.price, MATCH(company) AGAINST('ЗАО \\\"ПАН ТУРС\\\"'),
IF( o.country = 'РФ',e.output_price_rus,e.output_price_int ) as output_price, 25000*o.tourist as inputsum,
IF( o.country = 'РФ',e.output_price_rus,e.output_price_int )*o.tourist as outputsum,o.type_food
FROM excursions_price AS e,orders AS o
FULL OUTER JOIN restaurants_menu as m
ON o.type_food = m.type_menu
WHERE MONTH( o.addition_time ) = '4'
AND YEAR( o.addition_time ) = '2011'
AND o.tourist BETWEEN e.from_people and e.to_people
AND
MATCH(company)
AGAINST('ЗАО \\\"ПАН ТУРС\\\"')
AND o.id_exsc = e.id_exsc
Неактивен
В MySQL нет полного внешнего объединения в таком виде. Прийдется
писать через левые:
SELECT .. FROM a LEFT JOIN b ...
UNION
SELECT .. FROM b LEFT JOIN a ...
Неактивен