Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i have like
table1:
products:
apple
banana
orange
mango
from xlsheet;
when i go like this
load
previous(products) as previousvalues
resident table1;
i am getting data for previousvalues is like
previousvalues:
apple
banana
orange
it is missing mango here why ?
whether previous will not give last record ?
pls tell me ?
Previous returns the preceding value of the current row so, according to the load order before banana there is apple, before orange there is banana, before mango there is orange but
for the first record, apple there is nothing before, try with
LOAD products, Previous(products) Resident myTable;
DROP Table myTable;
hope this helps
Previous returns the preceding value of the current row so, according to the load order before banana there is apple, before orange there is banana, before mango there is orange but
for the first record, apple there is nothing before, try with
LOAD products, Previous(products) Resident myTable;
DROP Table myTable;
hope this helps
Other way round surely? It's the fact that mango is the last record, so can't be a previous value and show in that the field
You are talking about the same thing.
For the product 'apple' there is no previous product, while 'mango' will not be included in the PreviousProduct field.
regards
Marco