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: 
Anonymous
Not applicable

[resolved] Read data by months, Iterate?

Hi,
I have the following scenario:
tOracleInput ---------> tMap ---------> tOracleOutput
|
tOracleInput --------------|
The issue is that the connection where I take the data from with tOracleInput is really bad, and I have cuts in that connection.
Some of the tables have many rows that I have to take, so I wan't to take the data from the big tables month by month using one of the date fields in the table, but I don't know how to achieve it, maybe a context variable and iterating?
Can someone guide me on how to do it?
Thanks in advance,
Regards,
Khor
Labels (2)
11 Replies
Anonymous
Not applicable
Author

Hi
I solved the errors by changing the schema of tFileInputDelimited from date to string and writing the query like this:
"SELECT 
HL_STG_STK.PRUEBA_CAMIONES_OUT.ID_OPERACION,
HL_STG_STK.PRUEBA_CAMIONES_OUT.CAMION,
HL_STG_STK.PRUEBA_CAMIONES_OUT.EP,
HL_STG_STK.PRUEBA_CAMIONES_OUT.ET,
HL_STG_STK.PRUEBA_CAMIONES_OUT.ST,
HL_STG_STK.PRUEBA_CAMIONES_OUT.SP
FROM HL_STG_STK.PRUEBA_CAMIONES_OUT
WHERE HL_STG_STK.PRUEBA_CAMIONES_OUT.ET=to_date('"+row1.Month+"', 'yyyy/mm/dd hh24:mi:ss')"

Now the problem is that I read 0 rows but I guess that's a problem with my data or my database so thank you for all your help Pedro.
Regards,
Khor
Anonymous
Not applicable
Author

Hi
SELECT 
HL_STG_STK.PRUEBA_CAMIONES_OUT.ID_OPERACION,
HL_STG_STK.PRUEBA_CAMIONES_OUT.CAMION,
HL_STG_STK.PRUEBA_CAMIONES_OUT.EP,
HL_STG_STK.PRUEBA_CAMIONES_OUT.ET,
HL_STG_STK.PRUEBA_CAMIONES_OUT.ST,
HL_STG_STK.PRUEBA_CAMIONES_OUT.SP
FROM HL_STG_STK.PRUEBA_CAMIONES_OUT
WHERE HL_STG_STK.PRUEBA_CAMIONES_OUT.ET=to_date('"+row1.Month+"', 'dd-MM-yyyy')"

Regards,
Pedro