Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
arethaking
Creator II
Creator II

data load error

Hi All,

SalesDate column is coming from database. I am trying to implement incremental load.

SalesDate values are 01SEP2016,01OCT2016, and so on.

I am using reloadtime() function.

LET lastReloadTime = num(date(ReloadTime(),'DDMMMYYYY'));

Data:

LOAD *

FROM

[..\QVD\Sales.qvd]

(qvd);

Concatenate

LOAD *;

SQL SELECT * FROM Sales_Table

where  (num(date(Date#(SalesDate,'DDMMMYYYY'),'DDMMMYYYY')) > $(lastReloadTime));

Error Message:

expected something like ')' between the 'date' keyword and '('.

SQL SELECT * FROM Sales_Table

where  (num(date(Date#(SalesDate,'DDMMMYYYY'),'DDMMMYYYY')) > 42647.496226852)

Please help me.

1 Solution

Accepted Solutions
sushil353
Master II
Master II

Hi,

Try this: where  SalesDate> '04OCT2016'

if that works then use variable in quotes like : '$(lastReloadTime)'

HTH

View solution in original post

12 Replies
sushil353
Master II
Master II

Hi,

This might be due to (num(date(Date#(SalesDate,'DDMMMYYYY'),'DDMMMYYYY'))

why dont you simply use the date format of SalesDate field as it is and change the format of lastReloadTime accordingly..

HTH

Sushil

arethaking
Creator II
Creator II
Author

Hi Sushil,

My SalesDate is not in Date format in Qlikview. It is a character. That's why I am using format.

I followed your advise. Getting the below error message:

Syntax error, expected something like an 'OR' keyword or ')' between an integer and the word 'OCT2016'.

SQL SELECT * FROM Sales_Table

where  (SalesDate> 04OCT2016)

sushil353
Master II
Master II

Hi,

Try this: where  SalesDate> '04OCT2016'

if that works then use variable in quotes like : '$(lastReloadTime)'

HTH

Anil_Babu_Samineni

I've to ask one question before help. If your reload date is today. Then what output will come using this

LOAD *;

SQL SELECT * FROM Sales_Table

where  (num(date(Date#(SalesDate,'DDMMMYYYY'),'DDMMMYYYY')) > $(lastReloadTime));

Might be this, I've added this >= and then try with single quotes or without single quotes

LOAD *;

SQL SELECT * FROM Sales_Table

where  (num(date(Date#(SalesDate,'DDMMMYYYY'),'DDMMMYYYY')) >= '$(lastReloadTime)');

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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

Hi Aretha

You can use To_Char function to convert the date format in database side.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
arethaking
Creator II
Creator II
Author

Hi Mayil, Could you please provide the code. Thank you

sushil353
Master II
Master II

Some thing like this : SELECT to_char(column_date, 'yyyy/mm/dd') from table;

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Check this app.

I hope this might helps you.

-Nagarjun

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

!