Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all ,
I am using Incremental Load Script with ErrorMode. My ErrorMode syntax does not work when server not connecting to the database.
(It is not ignoring the failure and continue script execution.)
Kindly correct my below script if there is any error .
Let ThisExecTime = Date(Now( ),'YYYY-MM-DD hh:mm:ss')';
Let ReloadTime= Date(ReloadTime( ),'YYYY-MM-DD hh:mm:ss')';
Set Error Mode=-0;
ODBC connect to [SQLDATA;database=SQL1] (UserId is sa, Password is admin);
QV_Table:
SQL SELECT PrimaryKey, X, Y FROM CUSTOMER
WHERE ModificationTime >= #$(LastExecTime)#
AND ModificationTime < #$(ThisExecTime)#;
Concatenate LOAD PrimaryKey, X, Y FROM File.QVD
WHERE NOT EXISTS(PrimaryKey);
Inner Join SQL SELECT PrimaryKey FROM CUSTOMER;
If ScriptErrorCount = 0 then
STORE QV_Table INTO File.QVD;
Let ReloadTime= ThisExecTime;
End If
Drop Table QV_Table;
if ErrorMode=0 then
End if
Exit Script;
Hi,
If ErrorMode = 1, the script execution stops and it is prompted to user.
If ErrorMode = 0, then script execution simply ignores current statement and follows executing next statements
In your Script:
Set Error Mode=-0;
But It should be Set Error Mode=0; (remove - sign)
regards,
Dinu'1
Here I entered Wrong. I have given Set Error Mode =0; in my original script. it doesn't work.
Regards,
Sivasu
Hi,
I checked following code and it works fine to me. (example)
set errormode=0;
ODBC connect to [SQLDATA;database=SQL1] (UserId is sa, Password is admin);
LOAD * INLINE [
Code, Name
1, A
2, B
3, C
];
What is the reloading error you are getting? Check it. May be the wrong is with rest of the script.
regards,
dinu'1
It works in normal script but not in incremental load script.
I am getting error as "Server does not exist or access denied".
Can you upload the application. (Sample)
-dinu1