Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
This is my first post on the community although I have learn almost everything I know for Qlikview from it the last 3 years.
So thank you qlikview and qlikview fans for this massive knowledge offered so widely.
I have a problem with incremental loading script getting an error message as seen below.
Also I am attaching the script file I am using.
(the DB is SQLSERVER 2008)
The COSTMAIN_COSTDATE is (datetime , null) field and the select gives 2016-05-04 00:00:00.000.
Thanks in advance for any help provided
Michael M.
Try to add an
Exit Script;
statement just before the line with the STORE statement (it seems this line is throwing an error, right?) and check your data model created up to this using the table viewer (CTRL-T).
Which tables do you see and how many rows do each table show?
If you want to access a table on a database server, you need to establish a database connection and then use a SELECT statement to load the data.
A LOAD statement can be used as preceding load statement on top of the SQL select, but not as a standalone statement to access the DB.
Mr Wuhl
Thanks for your reply.
The database connection is on the MAIN TAB and the script runs smoothly up to the point that the variable '$(LAST_UPDATED_DATE)' gives the value on the where clause. So except from the connection I must have an incorrect load order or syntax on my script.because
So I made some changes replacing LOAD with select and I am getting a new error message (attached).
Probably I messed the script up.
Please advice
thanks in advance
Michael
Dear Michael,
Try to use the Wizard to connect.
Anyway, bellow, two videos to help you how connect to databases.
Loading ODBC Data into QlikView - YouTube
QlikView - Connect and Query Data - YouTube
Please, mark the CORRECT/HELPFULL comments.
Regards,
Ricardo Gerhard
Does z_constmain is a SQL table? If yes, please use SQL Select instead of LOAD
Try enclosing your variable in the WHERE clause in single quotes (looks like you did this in the attached script, but can't see the single quotes in your first screenshot) and also format the variable as timestamp:
//Store Last Modified Date
let LAST_UPDATED_DATE = Timestamp(PEEK('MaxDate',0,'LAST_UPDATED_DATE'),'YYYY-MM-DD hh:mm:ss.fff');
[...]
WHERE
COSTMAIN_COSTDATE > '$(LAST_UPDATED_DATE)';
Mr Wuhl thanks for your reply
Please spare 5 minutes to see some screen shots.
Thanks for the HELP to you an all community
Try to add an
Exit Script;
statement just before the line with the STORE statement (it seems this line is throwing an error, right?) and check your data model created up to this using the table viewer (CTRL-T).
Which tables do you see and how many rows do each table show?
Yes,
This was it. The 'Exit Script;'
Thank you very much for the precious knowledge transfer.
Very much obliged Mr Wuhl.
Just to clarify, the 'exit script;' should just help you finding the cause of your issue, if you leave it in your script, your QVD is probably not getting updated.
So, I assume the issue was something else, right?