
Hi everyone,
I´m having a problem in DTS with making the loading through DDQ!! It doesn´t give my any errors but the fact is that it doesn´t load me anything!!
I have the following code:
Function Main()
DTSDestination("chave_artigo")=DTSGlobalVariables( "@chave_artigo")
DTSDestination("artigo") = DTSSource("artigo")
DTSDestination("descr") = DTSSource("descr")
DTSDestination("descr_pos") = DTSSource("descr_pos")
DTSDestination("cod_seccao") = DTSSource("cod_seccao")
DTSDestination("cod_familia") = DTSSource("cod_familia")
DTSDestination("cod_sub_familia") = DTSSource("cod_sub_familia")
.....
if IsEmpty(DTSLookups("existe").Execute(DTSSource("ar tigo"))) then
DTSGlobalVariables("@chave_artigo").Value=DTSGloba lVariables("@chave_artigo").Value+1
Main=DTSTransformStat_InsertQuery
else
DTSGlobalVariables("@artigo_1") = DTSSource("artigo")
DTSGlobalVariables("@chave_artigo_2")=DTSDestinati on("chave_artigo")
......(store procedure call)
Main=DTSTransformStat_UpdateQuery
end if
End Function
And my insert clause is:
INSERT
INTO ARTIGO_DM
(chave_artigo, artigo,
descr, descr_pos, cod_seccao, cod_familia, cod_sub_familia,
cod_und_base, marca, und_media_capac, und_med_venda,
fact_conv_capac, gama_preco, tipo_shopping,
grau_visibilidade, permanente, situacao, cod_dir_comercial,
dir_comercial, cod_segmento_mercado,
segmento_mercado, cod_grupo_categoria, grupo_categoria, seccao,
familia, sub_familia, und_base, divisao, cod_divisao, cod_departamento,
departamento, tp_marca, cod_familia_parcial,
cod_sub_familia_parcial, cod_und_base_parcial, fornecedor_prior,
manutencao_geral)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?)
Kind Regards,
Lucinda