0
嗨下面是我在https://dbpedia.org/sparql上執行的sparql查詢。但是,由於總收入中存在一些字符值,並且如果我將查詢更改爲str(?grossincome)作爲?grossincome1),我得到一個錯誤「無效浮點值轉換」美國:'「,因此它會正確執行。我的問題是如何轉換所有貨幣相同的規模,以避免這個錯誤?運行sparql查詢獲取浮點值
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbp: <http://dbpedia.org/property/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
select distinct (str(?resource) as ?movietitle) (xsd:float(?budget) as ?budget1) (xsd:float(?grossincome) as ?grossincome1) (str(?Country) as ?country1) ?ReleaseDate where {
?movie foaf:name ?resource.
?movie dbo:budget ?budget.
?movie dbp:gross ?grossincome.
?movie dbp:country ?Country.
?movie dbo:releaseDate ?ReleaseDate.
FILTER (lang(?resource) = 'en').
}