Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
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
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

Creator II
Creator II

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)

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

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

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)

Hi Aretha

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

Thanks & Regards,
Mayil Vahanan R
Creator II
Creator II

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

Master II
Master II

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

Partner
Partner

Check this app.

I hope this might helps you.

-Nagarjun

Partner
Partner

!