Romanichine
Programmer
I am having problems converting the query below, which runs on Microsoft SQL Server, to MySQL.
I already converted ISNULL to IFNULL but still am getting
the following ODBC/MySQL error:
==========
[MERANT][ODBC MySql driver][MySql]You have an error in your SQL syntax near 'INNER JOIN currencies cur ON client.currency_id = cur.currency_id INNER JO' at line 26
==========
SELECT *
FROM valid_sales_ids s
RIGHT OUTER JOIN direct_services
ON s.sales_id = direct_services.sales_id
RIGHT OUTER JOIN client
INNER JOIN currencies cur
ON client.currency_id = cur.currency_id
INNER JOIN languages l
ON client.language_code = l.language_code
INNER JOIN companies
ON client.company_id = companies.company_id
LEFT OUTER JOIN valid_terminations v
ON client.termination_code = v.termination_code
ON direct_services.client_id = client.client_id
WHERE client.client_id = '0003216'
AND SUBSTRING(client.client_type,1,1) = Companies.company_id
AND IFNULL(client.language_code,1) = l.language_code
AND IFNULL(client.currency_id,1) = cur.currency_id
==========
Any help would be appreciated.
--
Roman.
I already converted ISNULL to IFNULL but still am getting
the following ODBC/MySQL error:
==========
[MERANT][ODBC MySql driver][MySql]You have an error in your SQL syntax near 'INNER JOIN currencies cur ON client.currency_id = cur.currency_id INNER JO' at line 26
==========
SELECT *
FROM valid_sales_ids s
RIGHT OUTER JOIN direct_services
ON s.sales_id = direct_services.sales_id
RIGHT OUTER JOIN client
INNER JOIN currencies cur
ON client.currency_id = cur.currency_id
INNER JOIN languages l
ON client.language_code = l.language_code
INNER JOIN companies
ON client.company_id = companies.company_id
LEFT OUTER JOIN valid_terminations v
ON client.termination_code = v.termination_code
ON direct_services.client_id = client.client_id
WHERE client.client_id = '0003216'
AND SUBSTRING(client.client_type,1,1) = Companies.company_id
AND IFNULL(client.language_code,1) = l.language_code
AND IFNULL(client.currency_id,1) = cur.currency_id
==========
Any help would be appreciated.
--
Roman.