Skip to Content
0
Sep 25, 2019 at 09:04 AM

Data services 4.2 SQL queries not generated using bind variables

219 Views Last edit Oct 08, 2019 at 01:37 PM 2 rev

Hi,

We have migrated from DS3.1 to DS 4.2 and we are facing the problem that the SQL queries generated in DS4.2
are not using Bind variables. However, we have configured the DSConfig.txt file, including the tag Parameterized SQL=TRUE.

The query generated in DS3.1 is the following:

SELECT COUNT(*) INTO LOCAL_VAR
FROM "DBA_STG_CMI"."CMI_ORIGENES_DATOS_AGR_TMP"
WHERE "INDICADOR_CODIGO" = :AL_BeforeVariable0 AND
"INDICADOR_NOMBRE" = :AL_BeforeVariable1 AND
"CENTRO_CODIGO" = :AL_BeforeVariable2 AND
"CENTRO_NOMBRE" = :AL_BeforeVariable3 AND
"ANYO" = :AL_BeforeVariable4 AND
"MES" = :AL_BeforeVariable5 AND
"M_VALOR" = :AL_BeforeVariable6 AND
"M_ACUMULADO" = :AL_BeforeVariable7 AND
"CONTROL_ORIGEN_FK" = :AL_BeforeVariable8 AND
"REGISTRO_ERRONEO" = :AL_BeforeVariable9 AND
"DESCARGA_ERRONEA" = :AL_BeforeVariable10 ;

But the query generated in DS4.2 is this (query data has been blanked by me):

SELECT COUNT(*) INTO LOCAL_VAR
FROM "DBA_STG_CMI"."CMI_ORIGENES_DATOS_AGR_TMP"
WHERE "INDICADOR_CODIGO" = 'xxxx' AND
"INDICADOR_NOMBRE" = 'xxxx' AND
"CENTRO_CODIGO" = '00000000' AND
"CENTRO_NOMBRE" = 'xxxxxxx' AND
"ANYO" = 0000 AND
"MES" = 0 AND
"M_VALOR" = 0,00 AND
"M_ACUMULADO" IS NULL AND
"CONTROL_ORIGEN_FK" = 0000 AND
"REGISTRO_ERRONEO" = 0 AND
"DESCARGA_ERRONEA" = 0 ;

So, we don't understand why the SQL generated does not behave like in DS3.1 since the configuration is the same, at least in the parameter: Parameterized SQL.

Is there any other parameter in DSConfig.txt that can affect this?
Is it possible that DS is taking any other DSConfig.txt different than the one in the working directory in DS4.2?

Please, any help is welcome. Thanks.

Jose Manuel.