Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

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

View solution in original post

16 Replies
khalander
Creator II
Creator II

Hi,

Try the below

where (REPORTDATE)> '$(vQVDDate)'

Anonymous
Not applicable
Author

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
Creator II
Creator II

Hi,

Try to use date function

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

rahulpawarb
Specialist III
Specialist III

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

Anonymous
Not applicable
Author

Hi Dada,

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

Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

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

Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
shraddha_g
Partner - Master III
Partner - Master III

Try changing

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

and then reload