Querying DB dynamically


I have a Database and want to query the DB dynamically using a variable in "where clause" of the SQL Query and the value of this variable may change accordingly.

For Example :  SELECT * FROM sample_table WHERE id = '$$varId$$'

   Here : "id" is of bigint datatype.

              "varId" is a context variable of varchar datatype, whose value is defined in process flow.



Problem In Generating XSD Strings, Error in executing query = SELECT * FROM sample_table WHERE id = '$$varId$$', Error: Error converting data type varchar to bigint.

The above mentioned error occurs when the user tries to Save the DB Schema after using any variable inside DB query. 



Similar kind of issues are handled in Advance Database schema rather than Database schema.

Database schema is used to execute the simple queries whereas the Advance Database schema can handle complex queries and queries using variables. 

Please use Adv Database Schema and you will be able to use variables inside DB Query.

Have more questions? Submit a request


Article is closed for comments.