Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, I have a table with the following structure
specialitemprice specialitemquantity name price quantity
23 7 abc 34 5
23 7 ddd 22 3
23 7 eee 77 2
23 7 fff 222 8
And I would like to convert it to:
name price quantity
abc 34 5
ddd 22 3
eee 77 2
fff 222 8
special_item 23 7
i.e. create "manually" a new row containing specialitem info (name will be hardcoded)
Any hint?
Thanks!
How about:
Final:
LOAD
name, price, quantity
from source;
Concatenate (Final)
LOAD DISTINCT
specialitemprice as name,
specialitemquantity as quantity
from source;
-Rob
Maybe
Table:
LOAD name,
price,
quantitiy
FROM YourTable;
LOAD 'special_item' as name,
specialitemprice as price,
specialitemquantity as quantity
FROM YourTable where recno() = 1;
How about:
Final:
LOAD
name, price, quantity
from source;
Concatenate (Final)
LOAD DISTINCT
specialitemprice as name,
specialitemquantity as quantity
from source;
-Rob
Hi Frijolita,
one possible solution for your problem could be:
tabPrices:
Load * Inline [
specialitemprice,specialitemquantity,name,price,quantity
23,7,abc,34,5
23,7,ddd,22,3
23,7,eee,77,2
23,7,fff,222,8
];
Concatenate
LOAD Distinct
'special_item' as name,
specialitemprice as price,
specialitemquantity as quantity
Resident tabPrices;
DROP Fields specialitemprice,specialitemquantity;
which turns this table
into this
hope this helps
regards
Marco