Thanks Andy and Joshua, I tried ?label1 < ?label2 and it worked. However, I still do not understand why the ?label1 != ?label2 did not work. I know Joshua you explained it a bit but I would be so grateful if you guys can pointe me out to a tutorial that explains all different parameters.
thanks On Tue, Mar 11, 2014 at 1:58 PM, Joshua TAYLOR <[email protected]>wrote: > 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/ > -- Adeeb Noor Ph.D. Candidate Dept of Computer Science University of Colorado at Boulder Cell: 571-484-3303 Email: [email protected]
