On Tue, Mar 11, 2014 at 3:37 PM, Adeeb Noor <[email protected]> wrote:
>
> I was trying to keep one label and remove the other using a sparqlupdate.
> For example by doing:
>
> DELETE { ddidd:C1412333 ddids:label  ?label2 .
>
> ddidd:C1412333 ddids:label ?label1 .}
>
> INSERT { ddidd:C1412333 ddids:label ?label1 . }
>
> WHERE  {
>
> ddidd:C1412333 ddids:label ?label1 .
>
> ddidd:C1412333 ddids:label ?label2.
>
> FILTER (?label1 != ?label2 )} ;
>
>
> However, after querying the ddidd:C1412333 I still got two labels. Am I
> doing something wrong.

I think your update is doing what's supposed to.  After all, if you have

:x :label "a", "b" .

You'll match twice:  once with label1 and label2 bound to "a" and "b",
and once with them bound to "b" and "a".  I think you need some policy
for _which_ of the two labels to delete.  E.g., instead of filter(
?label1 != ?label2 ), which is symmetric, how about filter( ?label1 <
?label2 )?

-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/

Reply via email to