Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
this seems like something pretty straightforward - but it doesn't work, so it cannot be that straightforward...
I define a variable (a numeric value) on the "Main" tab of my script. On another tab, I want to introduce into a LOAD statement (from a qvd) a new field calculated from
the sum of two fields from the table I am just loading (both of which are numeric values) multiplied with that numeric variable.
When I try that, I keep getting the script error message that a closing bracket is missing - but the bracketing is correct. I've checked it. In the error message, the variable is already neatly resolved, so that's all right.
Can anybody give me a hint here, there must be something one has to keep in mind when using variables that I missed.
Thanks a lot!
Best regards,
DataNibbler
You have defined v_Min_Price with a decimal comma. Number literals in script (and the variable contents are being treated as a number literal after expansion) have to be written with a decimal point, I think. Commas in script are syntactic elements, so that's probably why it throws errors, finding a comma where it is not expected.
Show us your script - there might be something you're missing.
Thanks for helping!
I post the code of my script - as much of it as is necessary for the question to become clear anyway.
Best regards,
DataNibbler
Use this expression just remove outer brackets it should work
(ITEM_PACKTIMES.SALES_PACKTIME + ITEM_PACKTIMES.SALES_PROCTIME) * $(v_Min_Price) as Item_Price
You have defined v_Min_Price with a decimal comma. Number literals in script (and the variable contents are being treated as a number literal after expansion) have to be written with a decimal point, I think. Commas in script are syntactic elements, so that's probably why it throws errors, finding a comma where it is not expected.
Hi,
I have done both - I removed the outer brackets and I replaced the comma with a dot in the variable definition - and it works.
Thanks a lot!
This is solved - proceed to next problem 😉
Best regards,
DataNibbler