Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There
I am getting the following error message in QlikView when I do an incremental reload to an exsiting QVD:
I find this error to be the most ambigious error ever! Just thought I should clear that up as this error frustrates me as it is not clear what it means.
I have a QVD which has all historic data stored in the same directory as my QVW. I am loading csv and Excel files which match the data structure of the QVD. The fields are exactly the same and the formats for each field are exaclty the same as the QVD.
The following is my code for setting up the historic QVD location and getting the maximum date when the data was last loaded.
let vQVDPath='.\User_Data_Historic.qvd'; //?? The QVD filename
LET vExecution = now();
set vLastExecTime = 0;
if not isnull(QVDCreateTime('$(vQVDPath)')) then
LoadTime:
load max(date(User_CalendarDate)) as User_CalendarDate
from $(vQVDPath)(qvd);
let vLastExecTime = peek('User_CalendarDate', 0, 'LoadTime');
drop table LoadTime ;
end if
Data:
noconcatenate load
U_ID,
[User_CalendarDate],
User_ID,
[User_Registration_Date],
ONLINE_ID,
[Login],
[POSTS],
[PAGE],
[LOGINS],
[MINUTES],
User_ACCEPTED,
User_GIVEN,
User_RECEIVED,
[User_NOTES],
Flag
resident MyTable where [User_CalendarDate] >= '$(vLastExecTime)' and [User_CalendarDate] < '$(vExecution)';
drop table MyTable;
The next step is to append the data, evaluating the load time for the QVD on the last load.
if not isnull(QvdCreateTime('$(vQVDPath)')) then
concatenate (Data) load
* from $(vQVDPath) (qvd) where not exists(U_ID);
end if
if NoOfRows('Data') > 0 then
store Data into $(vQVDPath) (qvd);
Above is the load of new data. I have concatenated two Excel files together to form one table which should be appended to the historic QVD. Data should be loaded where the Calendar Date in the new data is higher than the maximum date in the historic QVD.
After reloading my script I get the 'Execution of Script Load' error and I have used this exact code for another dataset and I have encountered no error and runs fine. After reading many posts on the QlikCommunity, I have exhausted the many possible reasons into why I get the error.
Does someone know why this is happening only on this load and not on other loads?
Thanks
Hi,
so where would I insert the trace string ?
SQL SELECT Amount,
CFGLAcc,
CustAccType,
DealBalPos,
IdxDeal,
IdxEffDte,
IdxPostDte,
Narrative,
StructCode,
StructureName,
TranType
FROM "Acquire_30092012".dbo.TrnMain
WHERE TranType IN ('CBMEDCOMMRES','CBMEDEXTIN','CBMEDEXTMTH','CBMEDEXTREM','CBMEDIN','CBMEDMTH','CBMEDREM');
SQL SELECT Amount,
CustAccType,
DealBalPos,
IdxDeal,
IdxEffDte,
IdxPostDte,
Narrative,
StructCode,
TranType
FROM "Acquire_30092012".dbo.ArcTrnMain
WHERE TranType IN ('CBMEDCOMMRES','CBMEDEXTIN','CBMEDEXTMTH','CBMEDEXTREM','CBMEDIN','CBMEDMTH','CBMEDREM');
Hi,
for example:
Table1:
Load *;
Your SQL;
Let Hi = NoOfRows('Table1') & ' rows in Main Table';
trace $(Hi);
or
Let Hi = ‘Last value loaded is ‘ & peek(‘<YourFieldName>’,-1,‘<Table1>’) ;
Trace $(Hi);
Trace $(ScriptError) ;
Regards
André Gomes
Confirm - this really helps!
I meant this post made by Saravana Prabhu P above:
[
In my case I was able to resolve by following below approach.
i commented code after main tab and executed
slowly progressed by one tab at a time, finally I was able to successfully execute the complete script.
Don't ask me the logic behind this, but it worked
]
I observed the same too but I inserted "exit script" beginning from the 1st to the last script line with some step (at the end of next tab or after some cycle, etc.). I'm not sure it ensures of all the cases you got the error, but when an old script starts to fail I'd recommend this as first help.
Best regards,
Maxim
Hi,
this thread didn't answered your question?
Regards
André Gomes
Hi Andre,
what I had done in the end, was create views in the sql database, and then linked to them to resolve my issue.
Thanks Roberto. Though after a long time your suggestion worked for me. In my case, source for my QV file is binary load from another QVW file which i think got locked for some reason. Deleting the source QVW file and creating it freshly and reloading it into my actual QV application resolved the problem.
But then it was a problem on SQL-side?
Suggest to use the NOLOCKS-parameter, when downloading from a database
HTH peter
I had a similar error, and I suspect it's a different issue to what you had, but it might help others.
I was developing my model and had added an Exit Script point following some changes in the script to facilitate testing. After every reload I would get a General Script Error, but no actual error, and nothing indicating a problem in the log file. When I removed the Exit Script point and allowed the full script to run it was OK. I suspect the issue related to INPUTFIELDs that were declared at the start of the script, but which were then not actually loaded from the database due to the premature Exit Script.
@Prabhu0505 You are the STAR! It worked for me too. I spent nearly two days to figure out what is wrong with my code but I couldn't work it out. As per your solution, I commented out the script across all the tabs and started uncommenting and reloading the script one tab at a time and there it is, it's working just fine Thanks and appreciations!
I had the same wrong message popping out, my case was becasue I occupied the output qvd/txt file when I reload the script...hope anyone who has the same problem with me can find this helpful.