Search notes:

SQL Server: data type xml

select value

With value, it's possible to extract data from a column whose data type is xml:
create table tq84_xml (
  id  integer primary key,
  doc xml
)

insert into tq84_xml  values (1,
'<tq84>
  <foo>hello wordl</foo>
  <bar>
    <baz>42</baz>
  </bar>
</tq84>'
);

select
  doc.value('(//foo)[1]'    , 'varchar(max)') bar,
  doc.value('(//bar/baz)[1]', 'integer'     ) bar_baz
from
  tq84_xml;

drop table tq84_xml;
Github repository about-MSSQL, path: /t-sql/data-types/xml/select-value.sql

See also

The PowerShell cmdLet noun CSV
XML
data types

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1737532964, '18.119.103.8', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQL-Server/T-SQL/data-types/xml/index(67): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78