I need help in getting the last row using peek function and below is the sample data.
LOAD * Inline
Peek(ID,0) as FirstValue
By using the above peek function i can able to get the first row into FirstValue field i,e, '1' but when i use 'Peek(ID,-1) as LastValue' i'm getting '1' and '2' but i want to see only '3'.
Can someone help me to identify the issue.
@Frank_Hartmann thanks for that, but my requirement is I want first value and last value. It means if i use 'Peek(ID,0) as FirstValue' i want the result as '1' as below
And if i use 'Peek(ID,-1) as LastValue' i want the result as '3' as below
@sunny_talwar thanks for that, it works for me and i've modified the script a little bit as below in order to get the firstvalue as well.
LOAD LastValue(ID) as LastValue, FirstValue(ID) as FirstValue;
LOAD * INLINE [