Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Carga Incremental

Hola quiero hacer una carga incremental dia a dia teniendo en cuenta la ultima fecha cargada, todo va bien hasta que me dice que no encuentra el qvd cargado previamente, por lo cual existe.
en vQVD_Exists = if(FileSize($(vQVD_file) )>0, -1, 0); me devuelve 0 como que el arhchivo no existe
ODBC
CONNECT TO Comercios (XUserId is fVILHRFMDbaKHYNORDbYJ, XPassword is PCcUWZUMEbYIVGFHJTacWRC);
/*
Temp_movimientos:

SET

vQVD_File = C:\Users\lramos\Documents\QlikView\QVD\movim.qvd;
LOAD
*
From
$(vQVD_File) (qvd);
Max_Fecha:
Load
FECHA_PRES resident Temp_movimientos
order
by FECHA_PRES DESC;
LET
vUltFecha = Peek('FECHA_PRES', 0);
LET
vUltFecha = Left(vUltFecha, 10);
Movimientos:
SET
vQVD_File = C:\Users\lramos\Documents\QlikView\QVD\movim.qvd;
let
vQVD_Exists = if(FileSize($(vQVD_file) )>0, -1, 0);
if
$(vQVD_Exists) then
Concatenate
(Temp_movimientos)
SQL
SELECT *
FROM Comercios.dbo."T_MOVIMIENTOS_PRESENTADOS"
WHERE FECHA_PRES >
$(vUltFecha) and FECHA_PRES <= '2009-01-01';
ENDIF
//STORE Movimientos into $(vQVD_File)(qvd);
Labels (1)
1 Reply
Not applicable
Author

Hola, fijate cuando corres este script tenes en memoria la tabla "Movimientos". De ser que no, agregale debajo de "Movimientos:" el NoConcatenate, lo mismo para la tabla "Max_Fecha", puede ser que te este formando una sola tabla llamada "Temp_Movimientos" y es por eso que no encuentre la tabla "Movimientos"

Ejemplo de lo que menciono:

ODBC

CONNECT TO Comercios (XUserId is fVILHRFMDbaKHYNORDbYJ, XPassword is PCcUWZUMEbYIVGFHJTacWRC);

/*

Temp_movimientos:

SET

vQVD_File = C:\Users\lramos\Documents\QlikView\QVD\movim.qvd;

LOAD

*

From

$(vQVD_File) (qvd);

Max_Fecha:

NoConcatenate

Load

FECHA_PRES resident Temp_movimientos

order

by FECHA_PRES DESC;

LET

vUltFecha = Peek('FECHA_PRES', 0);

LET

vUltFecha = Left(vUltFecha, 10);

Movimientos:

NoConcatenate

SET

vQVD_File = C:\Users\lramos\Documents\QlikView\QVD\movim.qvd;

let

vQVD_Exists = if(FileSize($(vQVD_file) )>0, -1, 0);

if

$(vQVD_Exists) then

Concatenate

(Temp_movimientos)

SQL

SELECT *

FROM Comercios.dbo."T_MOVIMIENTOS_PRESENTADOS"

WHERE FECHA_PRES >

$(vUltFecha) and FECHA_PRES <= '2009-01-01';

ENDIF

//STORE Movimientos into $(vQVD_File)(qvd);

Proba esto y despues contame.

Saludos!.

Ivan.