Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have created a pivot table where the expressions has field names which are expressions. For instance:
Name '31-Aug' & Year(Today())
a 1
b 2
c 3
d 4
This is an input for another document. Hence the script load:
Load Name,
[31-Aug-2014]
From
Sample.xls
However this data is changed in the next year so the first table becomes
Name | '31-Aug' & Year(Today()) | |
a | 5 | |
b | 6 | |
c | 7 | |
d | 8 |
And the script load
Load Name,
[31-Aug-2015]
From
Sample.xls
Is there anyway I can alias a field to an expression?
Thank you in advance
You could use '*' or field number reference instead of directly putting field name like:
Load * From <>; // this works if you want all the fields in the excel sheet
Load Name, @2 From <>; // @2 - refers the column number 2
Thank you but there is another condition.
I am to join a third table with the second table based on the value in the field [31-Aug-2014].
So how am I to join if I cant rename the third table to the same name as in the fields of the second table
You can rename it in normal way like:
Load @2 as Key,
Name
From <>;
Join
Load *, key From <>;
Now, this gives you the field whatever name it may have and join with another table.