SQL error in the kace SMA that works fine in mysql workbench.
Hi there guys.
Could you consider the code below. It is a nipped of a larger code where i would have to substitute values in a lot of places. Thus chose to use a variable.
This code works fine in mysql workbench with an odbc connection to the SMA.
But in the kace SQL report it gives me an error ........... [mysqli error: [1064: You have an error in your SQL syntax; check.............]
Does the Kace sma not know about setting variables? And is there any way to make this work on the SMA.
See example code....
SET @user_id = 10992;
SELECT CONCAT('JBN USER TALLY:', V2.FIELD_VALUE) AS DEVICE, "" as ASSIGNED_TO, ""
LEFT JOIN USER_FIELD_VALUE V2 ON V2.USER_ID = USER.ID AND V2.FIELD_ID = 2
WHERE USER.ID = @user_id
Be the first to answer this question