order by a XML column

Поиск
Список
Период
Сортировка
От mclo@asia.com (Chris)
Тема order by a XML column
Дата
Msg-id 2d44b924.0203132044.58a501d@posting.google.com
обсуждение исходный текст
Ответы Re: order by a XML column  (John Gray <jgray@azuli.co.uk>)
Список pgsql-general
Hi,

I have a table with a varchar column which store XML in this format :

<A>Value of A</A><B>Value of B</B><C>Value of C</C>

How can I sort the result by this column and the content of one of the tag.

e.g.  The table has 2 rows :
row 1: <A>Man</A><B>Woman</B><C>Child</C>
row 2: <A>Tree</A><B>Flower</B></C>Plant</C>

If I sort by the tag "<B>", the result would be :
row 2
row 1

If I sort by the tag "<A>", the result would be :
row 1
row 2

Thanks & Regards,
Chris

В списке pgsql-general по дате отправления:

Предыдущее
От: Sergio Freue
Дата:
Сообщение: Select not using primary key index
Следующее
От: Joseph
Дата:
Сообщение: pgmonitor