I have a dictionary(String, String) which has values and those values are to be inserted in a DB table. I’m using a insert-into statement using Run Query activity, but it results in a compiler error. Is the below code correct.?
INSERT Into tradebot.share_details
VALUES(’ “+dictionary_Data(“customer_id”).ToString+” ',
’ “+dictionary_Data(“price”).ToString+” ');
My insert query in the ‘Run query’ activity is as below.
The error says “String query must end with double quotes”. Kindly suggest what changes are to be done.
What’s in the data? If there is a single quote in description then it’ll break the quote pairs.
What you should do is assign that to a variable then output the variable with a Log Message so you can see the final actual resulting query.
Also, when you paste code into a comment here, you should highlight it and click the </> button in the toolbar. That way it won’t alter the fonts. It appears that you have the wrong double quote characters, but that could just be because this forum is changing them when you post.
Dictionary is (String,String) type. I tried various possibilities of quotes, resulting in same error message, “String constant should end with double quotes.”