Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello fellow QV developers,
Consider the below table:
Test |
A |
B |
C |
New Column
Test |
A |
A |
A |
B |
B |
B |
C |
C |
C |
C |
I'm asked to propogate values in column Test until there is a non-null value. For example, i would like to see A replicated until there is non-null value and B replicated until there is a non null etc.
Kindly guide me as to how i would write a script for such a requirement.
Cheers.
Thomas
Maybe like this:
LOAD
if(len(trim(Test)),Test ,peek(Test) ) as Test
FROM ...;
Maybe like this:
LOAD
if(len(trim(Test)),Test ,peek(Test) ) as Test
FROM ...;
Hi,
Use below ex. in your script.
Ex:
LOAD if(Len(Trim(Test))=0,Peek(Test),Test) as Test,SNo INLINE [
Test,SNo
A,1
,2
,3
B,4
,5
,6
C,7
,8
,9
];
Find the attached file.
Worked like a charm. Thanks guys