Discussion Board for collaboration related to QlikView App Development.
Hi everyone,
I have QVD in this format below as shown.
DateTime Column1 Column2
8/16/2017 0:00:30 | 6.287724 | 27.69061 |
8/16/2017 0:01:00 | 6.248081 | 27.69014 |
8/16/2017 0:01:30 | 6.293028 | 27.68986 |
8/16/2017 0:02:00 | 6.248443 | 27.68856 |
8/16/2017 0:02:30 | 6.281975 | 27.68705 |
8/16/2017 0:03:00 | 6.255635 | 27.68851 |
8/16/2017 0:03:30 | 6.280052 | 27.68943 |
8/16/2017 0:04:00 | 6.260656 | 27.6895 |
8/16/2017 0:04:30 | 6.257726 | 27.68903 |
8/16/2017 0:05:00 | 6.271708 | 27.69188 |
8/16/2017 0:05:30 | 6.222175 | 27.68902 |
8/16/2017 0:06:00 | 6.269296 | 27.6888 |
8/16/2017 0:06:30 | 6.31646 | 27.68938 |
8/16/2017 0:07:00 | 6.31679 | 27.69238 |
8/16/2017 0:07:30 | 6.287128 | 27.68573 |
8/16/2017 0:08:00 | 6.312551 | 27.68866 |
8/16/2017 0:08:30 | 6.327659 | 27.68919 |
8/16/2017 0:09:00 | 6.240479 | 27.68662 |
8/16/2017 0:09:30 | 6.281126 | 27.69056 |
8/16/2017 0:10:00 | 6.264267 | 27.69086 |
8/16/2017 0:10:30 | 6.257173 | 27.6921 |
So I need to give a filter while loading QVD so it loads row1 and deletes row2& 3 and loads row4 and so on...
Can anyone let me know what is the filter we need to use while loading this QVD.
Thanks for any help!!
Hi Rajender,
Consider this table:
RecNo() | Mod(RecNo()-1,7) |
1 | 0 |
2 | 1 |
3 | 2 |
4 | 3 |
5 | 4 |
6 | 5 |
7 | 6 |
8 | 0 |
9 | 1 |
10 | 2 |
11 | 3 |
12 | 4 |
13 | 5 |
14 | 6 |
15 | 0 |
16 | 1 |
17 | 2 |
18 | 3 |
19 | 4 |
20 | 5 |
you'll see that the where clause to use is
WHERE Mod(RecNo()-1,7) <=1
Regards
Andrew
So, if I understand correctly you need to delete every second and third row?
If that's the case, you could load first the QVD then with NoConcatenate reload it from resident into a new table with a for loop; use a counter to avoid loading the second and third row; then drop the original table
LOAD *
FROM myqvd.qvd (qvd)
WHERE NOT Match(RecNo(), 2, 3);
-Rob
Hi Lorenzo,
Thanks for your reply on this post.
Can you please post a sample script So it will be more helpful.
Hello Rob,
Thanks for you reply on this post.
I want to load QVD first row and delete 2 & 3 rows, load 4th row and delete 5 & 6 rows and so on.
If you have any script please post here so it will be helpful.
Hi Rajender,
Try:
LOAD *
FROM myqvd.qvd (qvd)
WHERE Mod(RecNo()-1,3) = 0;
Regards
Andrew
Hi Andrew,
Thanks for your reply.
Do you know how to load 2 rows and skip 5 rows and load 2 rows again and skip 5 rows and so on using QVD load.
Hi Rajender,
Consider this table:
RecNo() | Mod(RecNo()-1,7) |
1 | 0 |
2 | 1 |
3 | 2 |
4 | 3 |
5 | 4 |
6 | 5 |
7 | 6 |
8 | 0 |
9 | 1 |
10 | 2 |
11 | 3 |
12 | 4 |
13 | 5 |
14 | 6 |
15 | 0 |
16 | 1 |
17 | 2 |
18 | 3 |
19 | 4 |
20 | 5 |
you'll see that the where clause to use is
WHERE Mod(RecNo()-1,7) <=1
Regards
Andrew
Thanks Andrew Walker for your reply & that really helped me.