|
need help with extract(xml)
|
|||
---|---|---|---|
#18+
Доброго времени суток. Есть задача извлечь данные из xml по определенному условию. В xml есть несколько одинаковых блоков ... <address> <city>string</city> <street>[string]</street> <flat>[number]</flat> <type>[number]</type> <lastupd>[date]</lastupd> </address> ... <address> <city></city> <street></street> <flat></flat> <type> </type> <lastupd></lastupd> </address> ... Нужно вывести адрес с типом 1, и максимальным значением lastupd. C первым условием проблем нет select xmltype().extract('//address[type=1]','') from dual А вот со вторым проблема...возможно ли в extract применять min max count...? Если да подскажите где посмотреть синтаксис. Мои попытки успеха не принесли: select xmltype().extract('//count(address[type=1]'),'') from dual ====================== select xmltype().extract('//[count(address[type=1]')],'') from dual ====================== select xmltype().extract('//address[type=1 and max(lastupd)]','') from dual ====================== select xmltype().extract('//address[type=1 and lastupd=max(lastupd)','') from dual ... ... |
|||
:
Нравится:
Не нравится:
|
|||
20.03.2014, 07:23 |
|
|
start [/forum/topic.php?fid=14&fpage=14&tid=1332383]: |
0ms |
get settings: |
10ms |
get forum list: |
12ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
53ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
28ms |
get tp. blocked users: |
2ms |
others: | 12ms |
total: | 140ms |
0 / 0 |