Hello Guys ,
I'm trying to execute some INSERT and UPDATE querys on a Oracle Database using the "Run SQL Command but the command it is not working.
I'm trying to execute this query:
UPDATE CAT_NODOSP_HISTORICO H
SET H.FEC_FIN=(SELECT N.FEC_FIN FROM CAT_NODOS N
WHERE N.SISTEMA=H.SISTEMA AND N.GCR=H.GCR AND N.ZONA_CARGA=H.ZONA_CARGA AND
N.CLAVE_NODOP=H.CLAVE_NODOP AND N.TENSION=H.TENSION AND N.ENT_FED=H.ENT_FED)
WHERE EXISTS (SELECT 1 FROM CAT_NODOS N
WHERE N.SISTEMA=H.SISTEMA AND N.GCR=H.GCR AND N.ZONA_CARGA=H.ZONA_CARGA AND
N.CLAVE_NODOP=H.CLAVE_NODOP AND N.TENSION=H.TENSION AND N.ENT_FED=H.ENT_FED)
RPA command code:
sqlExecute --connection ${dbConnection} --statement "UPDATE CAT_NODOSP_HISTORICO H\r\nSET H.FEC_FIN=(SELECT N.FEC_FIN FROM CAT_NODOS N\r\nWHERE N.SISTEMA=H.SISTEMA AND N.GCR=H.GCR AND N.ZONA_CARGA=H.ZONA_CARGA AND\r\nN.CLAVE_NODOP=H.CLAVE_NODOP AND N.TENSION=H.TENSION AND N.ENT_FED=H.ENT_FED)\r\nWHERE EXISTS (SELECT 1 FROM CAT_NODOS N\r\nWHERE N.SISTEMA=H.SISTEMA AND N.GCR=H.GCR AND N.ZONA_CARGA=H.ZONA_CARGA AND\r\nN.CLAVE_NODOP=H.CLAVE_NODOP AND N.TENSION=H.TENSION AND N.ENT_FED=H.ENT_FED);" vResultadoEjecucion=value
and I get this error:
5/28/2023 6:59:11 PM - Error executing command at line 364: sqlExecute --connection ${dbConnection} --statement "UPDATE CAT_NODOSP_HISTORICO H\r\nSET H.FEC_FIN=(SELECT N.FEC_FIN FROM CAT_NODOS N\r\nWHERE N.SISTEMA=H.SISTEMA AND N.GCR=H.GCR AND N.ZONA_CARGA=H.ZONA_CARGA AND\r\nN.CLAVE_NODOP=H.CLAVE_NODOP AND N.TENSION=H.TENSION AND N.ENT_FED=H.ENT_FED)\r\nWHERE EXISTS (SELECT 1 FROM CAT_NODOS N\r\nWHERE N.SISTEMA=H.SISTEMA AND N.GCR=H.GCR AND N.ZONA_CARGA=H.ZONA_CARGA AND\r\nN.CLAVE_NODOP=H.CLAVE_NODOP AND N.TENSION=H.TENSION AND N.ENT_FED=H.ENT_FED);" vResultadoEjecucion=value
Error executing: UPDATE CAT_NODOSP_HISTORICO H
SET H.FEC_FIN=(SELECT N.FEC_FIN FROM CAT_NODOS N
WHERE N.SISTEMA=H.SISTEMA AND N.GCR=H.GCR AND N.ZONA_CARGA=H.ZONA_CARGA AND
N.CLAVE_NODOP=H.CLAVE_NODOP AND N.TENSION=H.TENSION AND N.ENT_FED=H.ENT_FED)
WHERE EXISTS (SELECT 1 FROM CAT_NODOS N
WHERE N.SISTEMA=H.SISTEMA AND N.GCR=H.GCR AND N.ZONA_CARGA=H.ZONA_CARGA AND
N.CLAVE_NODOP=H.CLAVE_NODOP AND N.TENSION=H.TENSION AND N.ENT_FED=H.ENT_FED);
There is not much explanation on the error message, so I hope you can help me . What is missing in order to make the command works ?
Thanks in advanced.
------------------------------
JORGE RAMSES ZARATE CARREOLA
------------------------------