4 Replies Latest reply on Jan 16, 2018 9:55 AM by rkandasamy-2 Branched from an earlier discussion. RSS
    rkandasamy-2 Newbie

    executing a sql query constructed dynamically fails

    Hi Pai,


    I have written a thingworx service as follows,



    String = "select * from sample;";

    var params = {

      fullQueryString: String /* STRING */


    // result: INFOTABLE dataShape: "undefined"

    var result = me.SQLQuery(params);


    I have written an SQLQuery   (SQL)as follows,


    But when i execute the root javascript service "GetDetails" i am getting the error as follows,

    Error executing service

    Wrapped org.postgresql.util.PSQLException: ERROR: syntax error at or near "$1" Position: 1 Cause: ERROR: syntax error at or near "$1" Position: 1


    Please let me know if  i am missing anything.