Re: Timestamp in load script, the time part is not what is should be.
In your where clause, you just need to compare numericals in the if() statement, so no need to format the numbers uisng num().
Would be interesting to know how you defined vStartLOAD, but even without knowing, I believe your issue arise from how QV expands the dollar signe expansion.
As you see, timestamp($(vLastLoadDateTimeNUM)) expands to timestamp(41214,50...).
You are probably using a decimal separator ','. But QVs internal decimal separator is '.' so this number will not be correctly interpreted, instead it will be interpreted at best as two arguments to function timestamp.
Look into how QV handles dollar sign expansion and how you let QV return a legal decimal-point reflection using $(#vVariable).
Depending on how vStartLOAD is defined, you can also try