Hi,
I figured out my problem... My Xpath for preceding is one node too far since
the context node is already at the myRow. The solution should be as follows:
key = not(key = preceding::myRow/key)
Now I have another problem. I have two keys now instead of one. I want to
be able to filter rows based on these two keys which are unique.
For example, I have the following schema:
myRow
Key1
Key2
value
Sample data:
key1 key2 value
1 a 10
1 a 20
1 b 30
1 b 40
2 a 10
2 a 20
2 b 30
2 b 40
3 a 10
I only want to see the following rows in the table:
Sample data Filtered:
key1 key2 value
1 a 10
1 b 30
2 a 10
2 b 30
3 a 10
I have tried with the following filter expression(but it doesn't work fully):
key1 = not((key1= preceding::myRow/key1) and (key2= preceding::myRow/key2))
Results...
key1 key2 value
1 a 10
1 b 30
2 a 10
2 b 30 (missing this row.. I know why.. coz 2 happens before
and b as well)
3 a 10
> Hello,
>
[quoted text clipped - 31 lines]
> Thank you,
> Michael
mcchu - 07 Apr 2005 18:05 GMT
Hi,
Can someone please comment on the previous message on the Xpath expression
which I can use to filter duplicate records based on two unique keys?
The problem is that the current() function will not work when Filter Data is
used here because there is no current context node. However, it seems like
one can make use of the context node when using the child element not inside
a predicate expression.
I have tried many expressions. In most cases, it comes close to what I want
but not fully.
Regards,
Michael
> Hi,
>
[quoted text clipped - 82 lines]
> > Thank you,
> > Michael