Are the values โโin ?Oactual string literals? If not, it SUBSTR()wonโt do anything, since it is defined only for working on literals. If the values โโare URI / Blank Nodes, you will always get an empty column with the query written as is.
STR() , , :
SELECT * WHERE
{
?S ?P ?O .
BIND(SUBSTR(STR(?O), 2, 3) AS ?Substring)
}
SPARQL, , , , , . , , , .
, , , SPARQL SUBSTR() , 3 , 2. , Java, , 2 3, :
BIND(SUBSTR(STR(?O), 2, 1)
. 1 , 2