Query not running in cfquery tag but in workbench tool

I’m caught in a weird error.

A MySQL query gives syntax error when run in cfquery tag.
When that same query runs in MySQL Workbench tool it runs fine.

Any hints?

Any details?

Query
SET @OrderID = 1723;

CREATE TEMPORARY TABLE IF NOT EXISTS ServicePrices
(
ServiceID INT,
Price decimal(15,2)
);

Select * From ServicePrices;

Error Message
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 ‘CREATE TEMPORARY TABLE IF NOT EXISTS ServicePrices ( ServiceID INT, Price d’ at line 3

Do you have set allowMultiQueries=true in your datasource?

1 Like

Yes, found it and it actually worked. Great Thanks alot!