I don't know what has happened but now it works. I had the old query in Fuseki GUI so I'm sure I didn't change anything.

On 26/04/2023 9.19, Lorenz Buehmann wrote:
I cannot reproduce it:


Data (test.ttl):

|PREFIX : <https://example.org/foo#>||
||PREFIX skos: <http://www.w3.org/2004/02/skos/core#>||
||
||:Animals||
||  skos:prefLabel "animals"@en ;||
||  skos:altLabel "fauna"@en ;||
||  skos:hiddenLabel "aminals"@en ;||
||  skos:prefLabel "animaux"@fr ;||
||  skos:altLabel "faune"@fr .||
|

Query (test.rq):


|PREFIX skos: <http://www.w3.org/2004/02/skos/core#>||
||
||select ?s ?pl_al||
||where {||
||    ?s skos:prefLabel ?pl .||
||    ?s skos:altLabel ?al .||
||    bind(concat(?pl, ?al) as ?pl_al)||
||  }|


Usage (Jena CLI):

sparql --data test.ttl --query test.rq

Result:

---------------------------------------------------------
| s |                    | pl_al             |||
||=========================================================||
||| <https://example.org/foo#Animals> | "animauxfauna" |||
||| <https://example.org/foo#Animals> | "animauxfaune"@fr |||
||| <https://example.org/foo#Animals> | "animalsfauna"@en |||
||| <https://example.org/foo#Animals> | "animalsfaune" |||
||---------------------------------------------------------|


Do you have named graphs or something? I mean, is just one column empty or the whole resultset?



On 24.04.23 14:18, Mikael Pesonen wrote:

Not Jena question but hope someone can help. I have two columns with always equal amount of rows. How can they be combined into one column (variable)? This method doesn't work (example has different predicates):

select ?s ?pl_al
where {
    ?s skos:prefLabel ?pl .
    ?s skos:altLabel ?al .
    bind(concat(?pl, ?al) as ?pl_al)
  }


Reply via email to