Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
Как вывести в SELECT данные таблицы из поля, содержащего XML?
|
|||
|---|---|---|---|
|
#18+
Есть таблица hlt_MedRecord, в которой есть текстовое поле, содержащее xml данные. Пример данных: <?xml version="1.0"?> <ns0:root xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0=" http://xml.softrust.ru/schema/AddoHtm" xsi:schemaLocation=" http://xml.softrust.ru/schema/AddoHtm AddoHtm.xsd"> <ns0:element id="Date_in_xhtml" type="text" name="" value="19.01.2018" /> <ns0:element id="str_1" type="text" name="" value="" /> <ns0:element id="str_2" type="text" name="" value="" /> <ns0:element id="str_3" type="text" name="" value="Деформация наружного носа нет. Дыхание свободное, секрета нет." /> <ns0:element id="str_4" type="text" name="" value="Слизистая розовая, влажная. Перегородка по средней линии." /> <ns0:element id="str_5" type="text" name="" value="Носоглотка: свободная." /> <ns0:element id="str_6" type="text" name="" value="" /> <ns0:element id="str_7" type="text" name="" value="" /> <ns0:element id="str_8" type="text" name="" value="Паратонзиллярная клетчатка спокойная, надгортанник не изменен, чистый." /> <ns0:element id="str_9" type="text" name="" value="" /> <ns0:element id="str_10" type="text" name="" value="Подвижность хорошая. Вход свободный. Слизистая розовая." /> <ns0:element id="str_11" type="text" name="" value="Голосовые складки серые. Смыкание полное." /> <ns0:element id="str_12" type="text" name="" value="Заушная область спокойная. Слуховые проходы широкие АD/AS, кожа не" /> <ns0:element id="str_13" type="text" name="" value="изменена АD/AS, отделяемое – нет АD/AS. АD/AS б/перепонки серые, световой конус" /> <ns0:element id="str_14" type="text" name="" value="хорошо выражен, детали читаются." /> <ns0:element id="str_15" type="text" name="" value="" /> <ns0:element id="str_16" type="text" name="" value="АD/AS- СШ-нет, ШР-6м, РР-6м." /> <ns0:element id="str_17" type="text" name="" value="" /> <ns0:element id="str_18" type="text" name="" value="аекол 1 ч л 3 р в день 10 дней" /> <ns0:element id="str_19" type="text" name="" value="" /> <ns0:element id="str_20" type="text" name="" value="" /> <ns0:element id="str_21" type="text" name="" value="" /> <ns0:element id="str_22" type="text" name="" value="" /> <ns0:element id="str_23" type="text" name="" value="" /> <ns0:element id="str_24" type="text" name="" value="" /> <ns0:element id="str_25" type="text" name="" value="" /> <ns0:element id="Daten_in_xhtml" type="text" name="" value="" /> <ns0:element id="str_26" type="text" name="" value="" /> <ns0:element id="regim" type="checkbox" name="" value="checked" state="checked" /> <ns0:element id="print" type="textarea" name="" value="" /> <ns0:element id="zand_1" type="boldedSpan" name="zand_1" > <ns0:element id="and_1" value="на приеме" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_2" type="boldedSpan" name="zand_2" > <ns0:element id="and_2" value="на дому" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_3" type="boldedSpan" name="zand_3" > <ns0:element id="and_3" value="повторный прием" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_4" type="boldedSpan" name="zand_4" > <ns0:element id="and_4" value="Больная" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_5" type="boldedSpan" name="zand_5" > <ns0:element id="and_5" value="Больной" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_6" type="boldedSpan" name="zand_6" > <ns0:element id="and_6" value="неприятные ощущения в глотке:" state="true" type="spanItem"/> </ns0:element> <ns0:element id="zand_7" type="boldedSpan" name="zand_7" > <ns0:element id="and_7" value="жжение" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_8" type="boldedSpan" name="zand_8" > <ns0:element id="and_8" value="першение" state="true" type="spanItem"/> </ns0:element> <ns0:element id="zand_9" type="boldedSpan" name="zand_9" > <ns0:element id="and_9" value="периодическая" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_10" type="boldedSpan" name="zand_10" > <ns0:element id="and_10" value="болезненность при глотании" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_11" type="boldedSpan" name="zand_11" > <ns0:element id="and_11" value="Ощущение инородного тела в горле" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_12" type="boldedSpan" name="zand_12" > <ns0:element id="and_12" value="Сухость в глотке" state="true" type="spanItem"/> </ns0:element> <ns0:element id="zand_13" type="boldedSpan" name="zand_13" > <ns0:element id="and_13" value="затруднение глотания" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_14" type="boldedSpan" name="zand_14" > <ns0:element id="and_14" value="неприятный запах изо рта" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_15" type="boldedSpan" name="zand_15" > <ns0:element id="and_15" value=" частые простудные заболевания" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_16" type="boldedSpan" name="zand_16" > <ns0:element id="and_16" value="работа с хим. в-вами" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_17" type="boldedSpan" name="zand_17" > <ns0:element id="and_17" value="курение" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_18" type="boldedSpan" name="zand_18" > <ns0:element id="and_18" value="Слизистая задней стенки глотки" state="true" type="spanItem"/> </ns0:element> <ns0:element id="zand_19" type="boldedSpan" name="zand_19" > <ns0:element id="and_19" value="гиперемирована" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_20" type="boldedSpan" name="zand_20" > <ns0:element id="and_20" value="покрыта полукруглыми возвышениями небольшой величины темно-красного цвета," state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_21" type="boldedSpan" name="zand_21" > <ns0:element id="and_21" value="отечна," state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_22" type="boldedSpan" name="zand_22" > <ns0:element id="and_22" value="слизистая незначительно утолщена," state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_23" type="boldedSpan" name="zand_23" > <ns0:element id="and_23" value="поверхность задней стенки покрыта" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_24" type="boldedSpan" name="zand_24" > <ns0:element id="and_24" value="прозрачной," state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_25" type="boldedSpan" name="zand_25" > <ns0:element id="and_25" value="вязкой" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_26" type="boldedSpan" name="zand_26" > <ns0:element id="and_26" value="слизью." state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_27" type="boldedSpan" name="zand_27" > <ns0:element id="and_27" value="Слизистая задней стенки глотки" state="true" type="spanItem"/> </ns0:element> <ns0:element id="zand_28" type="boldedSpan" name="zand_28" > <ns0:element id="and_28" value="сухая," state="true" type="spanItem"/> </ns0:element> <ns0:element id="zand_29" type="boldedSpan" name="zand_29" > <ns0:element id="and_29" value="истончена," state="true" type="spanItem"/> </ns0:element> <ns0:element id="zand_30" type="boldedSpan" name="zand_30" > <ns0:element id="and_30" value="бледно-розового цвета." state="true" type="spanItem"/> </ns0:element> <ns0:element id="zand_31" type="boldedSpan" name="zand_31" > <ns0:element id="and_31" value="Хронический" state="true" type="spanItem"/> </ns0:element> <ns0:element id="zand_32" type="boldedSpan" name="zand_32" > <ns0:element id="and_32" value="катаральный" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_33" type="boldedSpan" name="zand_33" > <ns0:element id="and_33" value="гипертрофический" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_34" type="boldedSpan" name="zand_34" > <ns0:element id="and_34" value="боковой" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_35" type="boldedSpan" name="zand_35" > <ns0:element id="and_35" value="гранулезный" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_36" type="boldedSpan" name="zand_36" > <ns0:element id="and_36" value="атрофический" state="true" type="spanItem"/> </ns0:element> <ns0:element id="zand_37" type="boldedSpan" name="zand_37" > <ns0:element id="and_37" value="фарингит" state="true" type="spanItem"/> </ns0:element> <ns0:element id="zand_38" type="boldedSpan" name="zand_38" > <ns0:element id="and_38" value="Выдан б/л №" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_39" type="boldedSpan" name="zand_39" > <ns0:element id="and_39" value=" с" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_40" type="boldedSpan" name="zand_40" > <ns0:element id="and_40" value="по" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_41" type="boldedSpan" name="zand_41" > <ns0:element id="and_41" value="Б/л продлен с" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_42" type="boldedSpan" name="zand_42" > <ns0:element id="and_42" value="по" state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_43" type="boldedSpan" name="zand_43" > <ns0:element id="and_43" value="Б/л закрыт; к труду с " state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_44" type="boldedSpan" name="zand_44" > <ns0:element id="and_44" value=" Нетрудоспособность " state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_45" type="boldedSpan" name="zand_45" > <ns0:element id="and_45" value="дн. " state="false" type="spanItem"/> </ns0:element> <ns0:element id="zand_46" type="boldedSpan" name="zand_46" > <ns0:element id="and_46" value="след.явка " state="false" type="spanItem"/> </ns0:element> </ns0:root> Как вытащить из xml поле Date_in_xhtml? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.01.2018, 13:43 |
|
||
|
Как вывести в SELECT данные таблицы из поля, содержащего XML?
|
|||
|---|---|---|---|
|
#18+
seg856, Код: sql 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135. 136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 146. 147. 148. 149. 150. 151. 152. 153. 154. 155. 156. 157. 158. 159. 160. 161. 162. 163. 164. 165. 166. 167. 168. 169. 170. 171. 172. 173. 174. 175. 176. 177. 178. 179. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.01.2018, 14:07 |
|
||
|
Как вывести в SELECT данные таблицы из поля, содержащего XML?
|
|||
|---|---|---|---|
|
#18+
или так: Код: sql 1. 2. 3. 4. 5. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.01.2018, 14:10 |
|
||
|
Как вывести в SELECT данные таблицы из поля, содержащего XML?
|
|||
|---|---|---|---|
|
#18+
felix_ff, но это мы выбрали только данные из одной строки таблицы. А нельзя получить сразу столбец значений Date_in_xhtml? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.01.2018, 17:46 |
|
||
|
Как вывести в SELECT данные таблицы из поля, содержащего XML?
|
|||
|---|---|---|---|
|
#18+
seg856получить сразу столбец значений Date_in_xhtml Код: sql 1. 2. 3. 4. 5. 6. 7. 8. 9. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.01.2018, 18:13 |
|
||
|
Как вывести в SELECT данные таблицы из поля, содержащего XML?
|
|||
|---|---|---|---|
|
#18+
На выражение select try_convert(xml, data) as xdata from hlt_MedRecord выдается сообщение 'try_convert' is not a recognized built-in function name. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.01.2018, 19:39 |
|
||
|
Как вывести в SELECT данные таблицы из поля, содержащего XML?
|
|||
|---|---|---|---|
|
#18+
seg856, значит у вас версия сиквела ниже 2012. используйте тогда обычный convert ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.01.2018, 21:00 |
|
||
|
Как вывести в SELECT данные таблицы из поля, содержащего XML?
|
|||
|---|---|---|---|
|
#18+
Странно, версия 2014 стандарт. С convert получилось, спасибо. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 22.01.2018, 09:01 |
|
||
|
Как вывести в SELECT данные таблицы из поля, содержащего XML?
|
|||
|---|---|---|---|
|
#18+
seg856Странно, версия 2014 стандарт. С convert получилось, спасибо. Либо у вас 2014 SSMS, либо версия базы ниже 2012, либо одно из трех. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 22.01.2018, 09:46 |
|
||
|
|

start [/forum/topic.php?fid=46&fpage=168&tid=1690455]: |
0ms |
get settings: |
6ms |
get forum list: |
13ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
23ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
44ms |
get tp. blocked users: |
1ms |
| others: | 207ms |
| total: | 309ms |

| 0 / 0 |
