Re: [Tracker] Help: Can I remove data by condition "some field is empty"?
- From: Martyn Russell <martyn lanedo com>
- To: "Zhang, Jingke" <jingke zhang intel com>
- Cc: "Guo, Zhaojuan" <zhaojuan guo intel com>, "tracker-list gnome org" <tracker-list gnome org>
- Subject: Re: [Tracker] Help: Can I remove data by condition "some field is empty"?
- Date: Thu, 11 Nov 2010 11:02:35 +0000
On 11/11/10 01:30, Zhang, Jingke wrote:
Hi Martyn,
Thank you for your kindly help. I try sparql language:
Tracker-sparql -u --query="DELETE { ?a a nco:PersonContact } WHERE { ?a nco:fullname ?name .FILTER ( NOT
EXISTS { ?name } ) }"
It shows me: Could not run update, 1.94: syntax error, expected non-empty property list
I feel it is near to success, but is there any syntax error in my command? Thank you for more help! :)
You can query with this:
tracker-sparql -q "select ?urn where { ?urn a nco:Contact . FILTER ( NOT
EXISTS { ?urn nco:fullname ?name } ) }"
This works for me:
tracker-sparql -u -q "delete { ?urn a nco:PersonContact } where { ?urn a
nco:PersonContact . FILTER ( NOT EXISTS { ?urn nco:fullname ?name } ) }"
Note, the query shows that there are 2 contacts (which are added for
you) as presets for:
http://www.semanticdesktop.org/ontologies/2007/03/22/nco#default-contact-me
http://www.semanticdesktop.org/ontologies/2007/03/22/nco#default-contact-me-emergency
So you probably shouldn't be removing those if that's what you're doing.
In such cases, you can probably add to the filter by making sure those
two are not removed.
Hope this helps,
--
Regards,
Martyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]