-
Hy 👋 I created JS transformer with SQL query, but I am getting errors when try to run it. I don't use because variable in WHERE statement didn't work. Error: And this is my code: var patient = $('patient_id');
Thanks for help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
patientid is still a literal string there. var query = "select stuff from table where patientid = '" + patientid + "'"; -- use your local var or var query = "select stuff from table where patientid = '" + $('patientid') + "'"; -- use the channel var you already have if you do either of these it is obvious: logger.info(query); // show it it on the console
$c('SQLQueryFindPatient',query) // store it in the channelMap so you can see it in the message context |
Beta Was this translation helpful? Give feedback.
-
Your SQL query is missing a FROM. select Id FROM <some table> WHERE |
Beta Was this translation helpful? Give feedback.
Your SQL query is missing a FROM.