Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I can store the Path Names on variables and successfully use them. vData = 'D:\QlikviewData';
But when I try to pass parameters to a stored procedures, it does not work. Ex:
let mailTo = 'tugba@kuveytturk';
let From = 'server@kuveytturk'
let body = ' An error occured'
let subject = 'MIS Reload Error';
Hi,
try this:
Let vName = Chr(39)&'Rainer'&Chr(39);
The inverted commas then are part of the variable value.
Good luck!
Rainer
hi,
we use $ sign with variables only when we want to evaluate the contents on the right hand side of = sign (as in mailTo = 'tugba@kuveytturk'😉
but here u just need the contents of that variable ,so just use name of variable without using $ sign
let mailTo = 'tugba@kuveytturk';
let From = 'server@kuveytturk'
let body = ' An error occured'
let subject = 'MIS Reload Error';
SQL EXECUTE SP_SendMail @From =From , @To=mailTo, @Subject subject,@Body=body
thanks
Thank you for being concerned with my problem.
Rainer, I tried chr(39) and used the variable with $(), it really works thanks.
Tauqueer, I tried your solution, when I write just the variable name without $(), it shows the variable name but not its content. Thanks for your advice.
As a result I will use chr(39) with $().
Hi, I have one more question.
When I use ScriptError once, then I can not see its content any more.
For example if I compare its value, then this means I can not see what is inside it.
LOAD wrongColoumnName
FROM $(vData) Datasource.qvd (qvd);
IF ScriptError <> 0 THEN
let
END
When you use Variables and $-sign expansion, you need to use single quotes for those parameters that are supposed to look like strings.
For example:
If you need to create a condition like: TransYear = 2010, using a variable, you can use $(vYear) . However, for conditions like :
Product = 'Shoes', you need to enclose your $()-expansion in a set of single quotes:
Product = '$(vMyProduct)'
no need to tinker with CHR(39), in this case QlikView works well with the simple pair of single qoutes...
cheers,
Hi, I have one more question.
When I use ScriptError once, then I can not see its content any more.
For example if I compare its value, then this means I can not see what is inside it.
LOAD wrongColoumnName
FROM $(vData) Datasource.qvd (qvd);
IF ScriptError <> 0 THEN
let
error = 'An error has occured';END