Skip to content
Advertisement

Filtering multiple XML nodes using XPath in PostgreSQL

There is an XML with the structure:

And here is the SQL query that selects record values filtered by category code

Is it possible to filter “records” not only by one “category code”, but by multiple ones? I mean I’d like to use filter like this

or this

But both solution don’t work

Advertisement

Answer

Try using contains(ns:Code,"MAIN.CAT001") or contains(ns:Code,"MAIN.CAT003")]:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement