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 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');
Hi,
Try the below
where (REPORTDATE)> '$(vQVDDate)'
Hi Dada,
Thanks for you quick reply But I have written '$(vQVDDate)' in Single code i forgot to write in question.
But it not worked. any other solution. because REPORTDATE came from database and we are comparing in Oracle query. because i only want to fetch data for 3/3/2017 date. How i do this filtering at query level.
Hi,
Try to use date function
where date(REPORTDATE,'DD/MM/YYYY')> date('$(vQVDDate)','DD/MM/YYYY')
Hello Ishwar,
Could you please share the values of - vDBDate, vQVDDate and Test.REPORTDATE field along with it's format? Also, share the application with sample data, if possible. This will help us to find the root cause of the issue.
Regards!
Rahul
Hi Dada,
I have used date function in query but it is not working.
Hi Rahul,
I have shared Word file in that i have write sample code.
My vDBDate is - 3/3/2017 12:00:00 AM
My vQVDDate is 3/2/2017 12:00:00
My vDBDate is my Test.REPORTDATE i mention in code.
Hi Community,
Any solution of this question . because i want filter at query level.
How to apply filter at query.
is any function i can separate date from Timestamp
e.g.
I have date field in Oracle query like below
3/1/2017 12:00:00 AM
3/2/2017 12:00:00 AM
3/3/2017 12:00:00 AM
And
i want data like below
3/1/2017
3/2/2017
3/3/2017
which function i will used in Oracle query
In fact, This question is related to Oracle. And you should move to Oracle forum
Anyhow
Qlikview is simple
Date(Date#(DateField,'DD/MM/YYYY hh:mm:ss tt'),'DD/MM/YYYY')
In Oracle, You may need this by help of To_Char
To_Char(DateField, 'dd/mm/yyyy')
Try changing
Timestamp(max(REPORTDATE),'DD/MM/YYYY hh:mm:ss TT') AS QVD_MAX
and then reload