Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In the load script, i create a new field (price) which doesn´t exist in the table. Then i use this field to create another field.
If i load the data i get an error "the field price could not found".
What must i do?
LOAD
ID,
sDate,
Product,
SaleNumber,
Customer,
SaleNumber * 2 as price,
price * 0,19 as tax
FROM [lib://source/mehrere-spalten-vergleichen.xlsx]
(ooxml, embedded labels, table is Tabelle1);
Regards,
sam !
Thanks. This also works:
set myFunction = $1 * 2;
LOAD
ID,
sDate,
Product,
SaleNumber,
Customer,
$(myFunction(SaleNumber)) as price,
$(myFunction(SaleNumber)) * 0,19 as tax
FROM [lib://source/mehrere-spalten-vergleichen.xlsx]
(ooxml, embedded labels, table is Tabelle1);
regards,
sam
Hi Walter
Table1:
LOAD ID,
sDate,
Product,
SaleNumber,
Customer,
SaleNumber * 2 as price,
price * 0,19 as tax
FROM [lib://source/mehrere-spalten-vergleichen.xlsx]
(ooxml, embedded labels, table is Tabelle1);
Unquality *;
NoConcatenate
FinalTable:
LOAD ID,
sDate,
Product,
SaleNumber,
Customer,
Price,
Price * 0,19 As Price
Resident Table1;
Drop Table Table1;
Bye
I would do something like this:
LOAD
ID,
sDate,
Product,
SaleNumber,
Customer,
SaleNumber * 2 as price,
SaleNumber * 2 * 0,19 as tax
FROM [lib://source/mehrere-spalten-vergleichen.xlsx]
(ooxml, embedded labels, table is Tabelle1);
Thanks. This also works:
set myFunction = $1 * 2;
LOAD
ID,
sDate,
Product,
SaleNumber,
Customer,
$(myFunction(SaleNumber)) as price,
$(myFunction(SaleNumber)) * 0,19 as tax
FROM [lib://source/mehrere-spalten-vergleichen.xlsx]
(ooxml, embedded labels, table is Tabelle1);
regards,
sam