Skip to main content
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.

12 Replies
MayilVahanan

Hi

Please check below link for sample

https://sqlandplsql.com/2012/10/28/to_char-number-function-oracle/

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jagan
Luminary Alumni
Luminary Alumni

Hi,

You can simply use

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

TableName:

SELECT

*

FROM TableName

WHERE SalesDate > '$(lastReloadTime)';

jagan
Luminary Alumni
Luminary Alumni

From your Query:

SQL SELECT * FROM Sales_Table

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

Note: Num#(), Num(), Date#() and Date() are all qlikview functions, it won't work in SQL Queries, you can use only in LOAD statement but not in SELECT statment.

Hope this helps you.

Regards,

Jagan.