0

The below query I'm trying to run in oracle 11g DB but getting an error can anyone tell me how should I insert the query in the specified hardcoded value,

INSERT INTO EIPLOGGING.EIP_CONFIG (STORE_NAME,KEY,VALUE) values ('TscCommonConfig','DEV.TscPetsenseAppntmntSkuSnwflke.config','{"source":"UM","target":"Snowflake","endPoint":"https://tractorsupply.east-us-2.privatelink.snowflakecomputing.com/api/statements","timeoutInMs":"5000","retryMaxCount":"1","retryIntervalInSec":"1","enableSuccessLogger":"true","sqlQuery":"INSERT INTO WW_APPOINTMENT_ARTICLE (WW_APPT_ID,ARTICLE_NO,STORE_NO,TRANS_NO,TIME_DIM_KEY) **values ('<WW_APPT_ID>','<ARTICLE_NO>','<STORE_NO>','<TRANS_NO>','<TIME_DIM_KEY>')**","role":"SVCEIPDEV_ROLE","database":"TSC_DEV_DB","schema":"EDW","timeoutInSec":10}
');

Here I'm getting errors like

Error at Command Line: 11 Column: 363
Error report -
SQL Error: ORA-00917: missing comma
00917. 00000 -  "missing comma"
*Cause:    
*Action:
Mihul12
  • 1
  • 1
  • Replace `'` with `''` inside your string literals to escape the single quotes (or else use a q-quoted string literal). – MT0 Jul 28 '22 at 10:04
  • Just use your query and inside each string literal replace `'` with `''`. So where you have `"sqlquery":"... values ('','','','','' ...` then double up those quotes. – MT0 Jul 28 '22 at 10:12
  • @MT0, is there any other way where we can use single quote as we are inserting in CRM database and there double quote is not accepting – Mihul12 Jul 28 '22 at 10:32
  • You can also use q-qouted string literals (see the linked duplicate) or you can pass the values using bind variables (see the documentation for your CRM database as to how to use bind variables) or else consult the documentation for your CRM database as to how they suggest escaping quotes. – MT0 Jul 28 '22 at 10:47

0 Answers0