Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Insert query to external SQL database

Kaan Ozdemir March 29, 2022

I would like to insert the values on the issue into an external database when my scriptrunner post function is triggered. However i believe my sql statement does not work.

Here is how i try to populate the database:

def sqlStatementForm ="""
INSERT INTO TABLE ( DB_ZERO, DB_ONE, DB_TWO)
VALUES (${cf1}, ${cf2},${cf3})
"""

Possible errors that cross my mind are:

1-${cf} fields are populated with string values where some of the database fields are double in the external SQL (i am sending double values in string form)

2-${cf} fields need some sort of quotation or there is another syntax error that does not let SQL to read properly

I am horrible at logging for errors and am currently trying to figure out how to do it. Any help is appreciated meanwhile.

 

0 answers

Suggest an answer

Log in or Sign up to answer