Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm new to qlikview, and we currently have our qlikview setup so it gets all the data from our database from the very start. This is alot of data to be fetching every night.
Is there anyway we could only get data from the last 12 months?
Thanks
Just put a WHERE clause in your SQL load script?
LET vStartDate = AddYears(Today(),-1);
Data:
LOAD
Field1,
Field2,
Field3,
Etc
;
SQL SELECT
Field1,
Field2,
Field3,
Etc
FROM Table
WHERE YourDateField > '$(vStartDate)'
;
You may need to format the variable vStartDate to be the same as YourDateField.
Hope this helps,
Jason
Hi
Try like this
Data:
LOAD
Field1,
Field2,
Field3,
;WHERE YourDateField >=MonthStart( AddYears(Today(),-1));
or
Mr.Jason suggestion helps u.
note:Monthstart() gives the data from starting of the month..
Você pode fazer uma carga incremental, ou seja, voce tem dados que devem ser carregados todos os dias, as vezes até duas, tres ou mais vezes ao dia.
Veja o exemplo e adapte-o ao seu uso, no caso fiz um exemplo com excel de base.:
Base Excel:
ID - DATA - CLIENTE - VL_VENDAS
1 01/01/2008 - SADAFAFAG R$ 100,00
até 15/11/2012 ...
Script para gerar qvd com todos os dados, no caso 01/01/2008 até 31/10/2012, depois que estiver com a base completa, entra o qvd incremental, mes a mes.
Neste caso pode usar o script de baixo.
Funciona, só adaptar.
Abraço.
S
Você pode fazer uma carga incremental, ou seja, voce tem dados que devem ser carregados todos os dias, as vezes até duas, tres ou mais vezes ao dia.
Veja o exemplo e adapte-o ao seu uso, no caso fiz um exemplo com excel de base.:
Base Excel:
ID - DATA - CLIENTE - VL_VENDAS
1 01/01/2008 - SADAFAFAG R$ 100,00
até 15/11/2012 ...
Script para gerar qvd com todos os dados, no caso 01/01/2008 até 31/10/2012, depois que estiver com a base completa, entra o qvd incremental, mes a mes.
Neste caso pode usar o script de baixo.
Funciona, só adaptar.
Abraço.
S
Thank you, I will try all of the above and update