I have been trying to execute a mysql query through nodejs in a linux system but geting the errors. I have enabled the multipleStatements: true also. Here is the part of the query i am trying to use:
select
c.name as "Name",
cl.u_geographic_region as "Region",
CASE
WHEN cic.os like '%Windows%' THEN 'Windows'
WHEN cic.os like '%aix%' THEN 'AIX'
WHEN cic.os like '%esx%' THEN 'ESX'
WHEN cic.os like '%linux%' THEN 'Linux'
WHEN cic.os like '%solaris%' THEN 'Solaris'
ELSE 'UNKNOWN'
END as "Operating System",
ci.dns_domain as "Host domain",
ci.ip_address as "IP Address",
from
cmdb as c
join cmdb_ci ci on c.sys_id = ci.sys_id
In my windows laptop i was able to achieve the result of this big sql query by putting it in BackTicks. But when I use the backticks in linux its failing. Can anyone help me.