Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone !
I try to fill a name with a previous name where the values are nulls. I Tried with the function Previous():
IF(isNull(Name),Previous(Name),Name) // It's ok, but return one value.
Table:
id | Name |
1 | Danna |
2 | Issac |
3 | |
4 | |
5 | John |
6 |
And I need these values.
id | Name |
1 | Danna |
2 | Issac |
3 | Issac |
4 | Issac |
5 | John |
6 | John |
Thanks,
One way of doing this is as below:
Data:
Load
id,
If(Len(Name)>0,Name,Peek(Name)) as Name;
Load * Inline [
id, Name
1, Danna
2, Issac
3,
4,
5, John
6,
];
Hope this helps.
One way of doing this is as below:
Data:
Load
id,
If(Len(Name)>0,Name,Peek(Name)) as Name;
Load * Inline [
id, Name
1, Danna
2, Issac
3,
4,
5, John
6,
];
Hope this helps.
Previous cannot work for a row that has not been already loaded or present in internal.