Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to concatenate two tables in data loader, the problem is there is a syntax error, someone can help me?
TABLA_UTIL: SQL SELECT "PERIODO", SUM(DEUDAFINAL) as "DEUDAFINAL" FROM "DL_RG_ANALYTICS"."SH_PROVISION" PRO WHERE ORG='628' GROUP BY PERIODO concatenate SQL SELECT OL.PERIODO, SUM(ABIERTA/1000000)+ DEUDA/1000000 FROM "DL_RG_ANALYTICS"."SH_OTRAS_LINEAS" OL LEFT JOIN SH_SALDO_NO_IDEN_RUT PRO ON(OL.PERIODO=PRO.PERIODO) WHERE ((ol.TIPO_DEUDA='TRASPASO' AND ol.DEFINICION='SALDO' ) OR (ol.TIPO_DEUDA='SAE' AND ol.DEFINICION='SALDO' ) OR (ol.TIPO_DEUDA='REPACTACIONES' AND ol.DEFINICION='SALDO') OR (ol.TIPO_DEUDA='RENEGOCIADO' AND ol.DEFINICION='SALDO' ) OR (ol.TIPO_DEUDA='AVANCE_EFECTIVO' AND ol.DEFINICION='SALDO' )) AND PRO.TipoTarjeta='ABIERTA' GROUP BY OL.PERIODO, PRO.DEUDA
How it could be correctly? Thanks in advance!
My best guess is that you need a semi-colon after each of your SQL queries.
TABLA_UTIL: SQL SELECT "PERIODO", SUM(DEUDAFINAL) as "DEUDAFINAL" FROM "DL_RG_ANALYTICS"."SH_PROVISION" PRO WHERE ORG='628' GROUP BY PERIODO;
concatenate SQL SELECT OL.PERIODO, SUM(ABIERTA/1000000)+ DEUDA/1000000 FROM "DL_RG_ANALYTICS"."SH_OTRAS_LINEAS" OL LEFT JOIN SH_SALDO_NO_IDEN_RUT PRO ON(OL.PERIODO=PRO.PERIODO) WHERE ((ol.TIPO_DEUDA='TRASPASO' AND ol.DEFINICION='SALDO' ) OR (ol.TIPO_DEUDA='SAE' AND ol.DEFINICION='SALDO' ) OR (ol.TIPO_DEUDA='REPACTACIONES' AND ol.DEFINICION='SALDO') OR (ol.TIPO_DEUDA='RENEGOCIADO' AND ol.DEFINICION='SALDO' ) OR (ol.TIPO_DEUDA='AVANCE_EFECTIVO' AND ol.DEFINICION='SALDO' )) AND PRO.TipoTarjeta='ABIERTA' GROUP BY OL.PERIODO, PRO.DEUDA;
My best guess is that you need a semi-colon after each of your SQL queries.
TABLA_UTIL: SQL SELECT "PERIODO", SUM(DEUDAFINAL) as "DEUDAFINAL" FROM "DL_RG_ANALYTICS"."SH_PROVISION" PRO WHERE ORG='628' GROUP BY PERIODO;
concatenate SQL SELECT OL.PERIODO, SUM(ABIERTA/1000000)+ DEUDA/1000000 FROM "DL_RG_ANALYTICS"."SH_OTRAS_LINEAS" OL LEFT JOIN SH_SALDO_NO_IDEN_RUT PRO ON(OL.PERIODO=PRO.PERIODO) WHERE ((ol.TIPO_DEUDA='TRASPASO' AND ol.DEFINICION='SALDO' ) OR (ol.TIPO_DEUDA='SAE' AND ol.DEFINICION='SALDO' ) OR (ol.TIPO_DEUDA='REPACTACIONES' AND ol.DEFINICION='SALDO') OR (ol.TIPO_DEUDA='RENEGOCIADO' AND ol.DEFINICION='SALDO' ) OR (ol.TIPO_DEUDA='AVANCE_EFECTIVO' AND ol.DEFINICION='SALDO' )) AND PRO.TipoTarjeta='ABIERTA' GROUP BY OL.PERIODO, PRO.DEUDA;
Thanks!