Java script in adobe campaign workflow | Community
Skip to main content
July 9, 2018

Java script in adobe campaign workflow

  • July 9, 2018
  • 2 replies
  • 3495 views

var result1 = sqlSelect("rec_cnt, @rec_cnt:Int64",

        "SELECT count(*) from pl_aud_interaction where business_unit_cd in ('BTXU','BTXN') and file_id in (select file_id from pl_aud_file_detail where batch_id in (+ batch_id_btxu +, + batch_id_btxn +))");

When i run this i found below error code:

07/09/2018 10:42:00 AM Oracle error: ORA-00936: missing expression

07/09/2018 10:42:00 AM SQL statement 'SELECT count(*) from pl_aud_interaction where business_unit_cd in ('BTXU','BTXN') and file_id in (select file_id from pl_aud_file_detail where batch_id in (+ batch_id_btxu +, + batch_id_btxn +))' could not be executed (error in position 17

07/09/2018 10:42:00 AM 3: ',').

However the below similar code works fine when i execute :

var result1 = sqlSelect("rec_cnt, @rec_cnt:Int64",

        "SELECT count(*) from pl_aud_interaction where business_unit_cd in ('BTXU','BTXN') and file_id in (select file_id from pl_aud_file_detail where batch_id= " +batch_id+ ")");

Can someone please suggest where i am going wrong?

[Question moved to the Adobe Campaign forum]

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Bernd_Alheit
Level 4
July 9, 2018

Why do you post this in the forum for Acrobat JavaScript?

July 10, 2018

Hi mate,

Just by comparing the SQL statements, i can see that the following string isn't correctly formatted:

"SELECT count(*) from pl_aud_interaction where business_unit_cd in ('BTXU','BTXN') and file_id in (select file_id from pl_aud_file_detail where batch_id in (+ batch_id_btxu +, + batch_id_btxn +))");

Instead try:

"SELECT count(*) from pl_aud_interaction where business_unit_cd in ('BTXU','BTXN') and file_id in (select file_id from pl_aud_file_detail where batch_id in ("+ batch_id_btxu + ", " + batch_id_btxn +" ))");

Good luck and let me know how you get on!