Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I want to call a sub routine in my script. When the "call" statement is include in a IF, the script works correctly but when it's called as an independent instruction I get this error message: "Script Line Error".
Does anyone have an idea?
Thanks a lot,
Can you share some more information here please. Like a snapshot of your error and the subroutine you are using ?
Thank you Vishwarath,
here is my sub routine:
SUB Purge_Load_Status
Load_Status_Max_Year:
Load
Max(Year(Load_Date)) as MaxYearLoadStatus
From [$(_File_Load_Status)](qvd);
let maxDateLoadStatus = peek('MaxYearLoadStatus', 0, 'Load_Status_Max_Year'); //MaxDate chargée
Drop table Load_Status_Max_Year;
NoConcatenate
Load_Status:
Load *
From [$(_File_Load_Status)](qvd)
Where Year(Load_Date)>=($(maxDateLoadStatus)-2);
Store Load_Status into [$(_File_Load_Status)](qvd);
END SUB
Any specific reason you need a subroutine here? Cant you just run the LOAD as is. However, where is the IF you are using here? I dont find anything wrong with the LOAD script. Can we know what exactly you were trying to achieve ?