Deleting documents after date?

Hi,
i want to delete documents (xml and nonxml) in a database which are older than for example 100 days. Is there any function or possibility
to do this?

CU
FM_BAR

I imagine that you would be able to do this using XQuery and the Tamino function getLastModified.

Please practice on a test database until you are certain the delete query works as you expect!

Thank you, that is what i searched for…

But i have still a little problem:

  1. i can delete the xml-documents i have found with the query by using the xml-api, but i cannot find a “delete”-function in the non-xml-api?

  2. How can i delete with xquery? the “update delete” function
    is not able to delete documents, only nodes, without the root element.

I think that you should be able to delete XML (and probably non-XML) documents using XQuery.

The following thread probably helps in phrasing the XQuery to delete a document.

http://tamino.forums.softwareag.com/viewtopic.php?p=2980

Thanks for the link, now i have built a xquery to delete my documents if they are older than a specified date.
But i am using the TamX.XQuery(…) function, so this only deletes xml documents.
I have also a xquery, which deletes my text-documents, but how can i use this one in my programm?
I cannot find a function for doing a xquery with the nonxml-api…

I think that it should be possible to delete non-XML documents using XQuery.

This topic discusses how to delete non-XML documents using XQuery.

http://tamino.forums.softwareag.com/viewtopic.php?t=3012

Thanks, now i have solved my problem, with this query i can delete NonXml-documents with the TamX-Api:

declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction
update for $i in input()//:text
where tf:getInoId($i) = 1
do delete $i/…

This deletes the document with InoId = 1. I have defined a schema “text” in my collection and ‘text’ is a reserved word, so that i need the ‘//:’ before… i found this information also in the forum…

Thank you very much for the help…