Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a variable in my script as follows:
Set vAcadyear = 2016-17;
I then use this in several other places in my script (mostly in file names) which works just fine.
So
FROM
[$(vAcadyear)\Misc\Map.xls]
(biff, embedded labels, table is Points$);
Becomes
FROM
[2016-17\Misc\Map.xls]
(biff, embedded labels, table is Points$);
which is exactly what I want.
However, in another place in the LOAD statement I have:
LOAD
$(vAcadyear) as Year,
And that's not working as I want. In this case, it evaluates the variable, and gives me '1999' as 'Year' (i.e. 2016 minus 17!)
How do I get it to store this variable as a string, even though it "looks" like a calculation.
Thanks,
Jess
Hi!
Sorry, I dont understand:
LOAD
$(vAcadyear) as Year
Do you mean that you use the value 2016-17?
Is it possible to have the script or a sample app?
Yes, I would now expect the field 'year' to have the value '2016-17'
At the moment, it gives me the value '1999' which is wrong.
Hi Jessica,
Could you check the source field format? I guess there is some mis match in the format.
-Jai
Hello,
try with double quotes
like
"$(vAcadyear)" as Year
Regards
Hi Jai,
I'm afraid I don't understand what you mean.
With load inline work fine:
Set vAcadyear = '2016-17';
T:
LOAD * INLINE [
F1, F2
A, $(vAcadyear)
B, $(vAcadyear)
];
Can you try to write let = '2016-17'?
Hi Jessica,
Can you share the sample data, that look alike? (If Possible )
-Jai
Hi Prashant,
That gives me the following error:
Field not found - <2016-17>
Centre_data:
LOAD
"2016-17" as Year,
Jessica, try with let = '2016-17', it work.