Consider the output of the query:

SELECT *
WHERE {
  ?s ddids:label ?label1.
  ?s ddids:label ?label2.
  FILTER (?label1 != ?label2 ) .
}

then the query:

SELECT *
WHERE {
  ?s ddids:label ?label1.
  ?s ddids:label ?label2.
  FILTER (?label1 < ?label2 ) .
}

        Andy

On 11/03/14 19:37, Adeeb Noor wrote:
Hi All:

I have a question that is really driving me crazy:

-------------------------------------------------------------------------------------------

| s                             | Label1                     | Label2
                                       |

===========================================================================================

| ddidd:C1412333 | "ALDH1A1 gene" | "ALDEHYDE DEHYDROGENASE 1"
               |

| ddidd:C1412335 | "ALDH2 gene"   | "ALDEHYDE DEHYDROGENASE 2"
               |

This is a result of query that asks to give a subject with more than one
label.

SELECT DISTINCT  ?s

Different query.


WHERE {

?s ddids:label ?label1.

?s ddids:label ?label2.

FILTER (?label1 != ?label2 ) .

}

I have this a lot one my dataset due to the integration. FYI, there is no
more than two labels for each subject

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.


Thanks


Reply via email to