Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Announcement: Certain actions are currently causing a Page Not Found error. This is a known issue and we are working with the platform vendor to investigate and resolve it.
rock2016
Contributor

Increment load issue

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.

1 Solution

Accepted Solutions
rock2016
Contributor

Re: Increment load issue

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');

16 Replies
khalander
Contributor II

Re: Increment load issue

Hi,

Try the below

where (REPORTDATE)> '$(vQVDDate)'

rock2016
Contributor

Re: Increment load issue

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.

khalander
Contributor II

Re: Increment load issue

Hi,

Try to use date function

where date(REPORTDATE,'DD/MM/YYYY')> date('$(vQVDDate)','DD/MM/YYYY')

rahulpawarb
Valued Contributor III

Re: Increment load issue

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

rock2016
Contributor

Re: Increment load issue

Hi Dada,

I have used date function in query but it is not working.

rock2016
Contributor

Re: Increment load issue

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.

rock2016
Contributor

Re: Increment load issue

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

Re: Increment load issue

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')

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Partner
Partner

Re: Increment load issue

Try changing

  Timestamp(max(REPORTDATE),'DD/MM/YYYY hh:mm:ss TT') AS QVD_MAX

and then reload