Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I am developing incremental load for one table. I have also attached my incremental load script file.
I am facing many issue in that.
1) In my Qvd store date field with timestamp and daily refreshing table also have date field with timestamp but when i using
both field for comparision purpose that time my script not working properly.
you can see in script when i try to fetch data from table Test for date 3/3/2017 and my QVD present data for 2/3/2017 and i only want data for date 3/3/2017 and write logic in query see below
Test:
Load
Field_Name ,
REPORTDATE // Date field
SQL SELECT
Field_Name ,
REPORTDATE
FROM Test
where (REPORTDATE)> $(vQVDDate)
but this logic not working
even this steps also not run
if $(vDBDate) > $(vQVDDate) then
So how i tackle this issue.
Thanks in advance.
Hi Anil,
I have used this function it given value in string that when i debugging script this function showing value in ' ' single code and this not compare with QVD date. Qvd value in only date format.
is any other solution ?
Haha, Can you confirm one thing? Are you trying this in Qlikview / Oracle ??
Hi Shradhha,
I have also used this function but when i compared this variable in Oracale Query it not work properly.
Is any other solution.
Hi Anil,
I have attached my incremental code file.
Please refer that file you will get idea what i am saying.
From here, Where is Group By. I added can you do same.
Temp:
Load REPORTDATE,
DB_MAX
Sql Select REPORTDATE, DB_MAX
FROM Test;
Load REPORTDATE, DB_MAX, Max(REPORTDATE) as MaxRepDate Group By REPORTDATE
Resident Temp;
Hi Friends,
Thanks for your help.
I got answer to my question.
below link help me to resolve this issue.
1) https://community.qlik.com/thread/109953
From this thread i used below logic in my oracle query -
Test:
Load
field name,
Refresh date;
sql select
field name,
Refresh date
from Test where Refresh date > to_date('$(vQVDDate)', 'DD/MM/YYYY HH24:MI:SS');
Good, When this is working with SQL. It should work in Qlikview by using below code help
Test:
Load
field name,
Refresh date from Test where Refresh date > Date('$(vQVDDate)', 'DD/MM/YYYY HH:MM:SS tt'); //"tt works as 12 hours" and "TT works as 24 hours in qlikview"