select the value of the first <field> in xml column in sql

Nancy Ghazal

I have a table in sql database contains an xml column , I just want to export all the fields of the table but the xml column I just want the value of the first which named "CentrisNo", attached you may find sample of the table. I do really appreciate your help.xml field

manderson
select CAST(XMLData AS XML).value('(/Fields/Field/@Name)[1]', 'nvarchar(max)')
from yourTable

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

SQL Select: Take value from XML field

From Dev

SQL select first value in a row then insert that value into another column

From Dev

SQL select first value in a row then insert that value into another column

From Dev

How to select value from xml column in sql table

From Dev

SQL Server XQuery to select record if XML Column contains element with value

From Dev

How to select value from second column if first column is blank/null in SQL (MS SQL)?

From Dev

add column value to an xml field as an attribute

From Dev

Select first row for each different column value

From Dev

Laravel - select rows with first occurance of column value

From Dev

SQL select join on xml field with xpath expression

From Dev

SQL SELECT from XML field as multiple records

From Dev

select values from xml field sql server

From Dev

MySQL first select column based on parameter value and then value of column

From Dev

MySQL first select column based on parameter value and then value of column

From Dev

How to use column value in AS of SELECT FOR XML statement

From Dev

Get or select value out of xml column in SQL (Server) - remote function reference not allowed

From Dev

Trying to select a value from a field based on the value of a date field, where the first value is not NULL

From Dev

display field name as column and field value as row in sql server

From Java

SQL select only rows with max value on a column

From Dev

Return mutiple value for on column in sql select

From Dev

How to replace the column value in select statement in Sql?

From Dev

sql - select rows with a distinct value in a specific column

From Dev

SQL select column value with biggest number of duplicates

From Dev

How to replace the column value in select statement in Sql?

From Dev

Sql select query based on a column value

From Dev

Select highest value from a column SQL

From Dev

Sql Query to select a column value with an aggregate funtion?

From Dev

Read XML Value in SQL Select Statement

From Dev

Read XML Value in SQL Select Statement

Related Related

  1. 1

    SQL Select: Take value from XML field

  2. 2

    SQL select first value in a row then insert that value into another column

  3. 3

    SQL select first value in a row then insert that value into another column

  4. 4

    How to select value from xml column in sql table

  5. 5

    SQL Server XQuery to select record if XML Column contains element with value

  6. 6

    How to select value from second column if first column is blank/null in SQL (MS SQL)?

  7. 7

    add column value to an xml field as an attribute

  8. 8

    Select first row for each different column value

  9. 9

    Laravel - select rows with first occurance of column value

  10. 10

    SQL select join on xml field with xpath expression

  11. 11

    SQL SELECT from XML field as multiple records

  12. 12

    select values from xml field sql server

  13. 13

    MySQL first select column based on parameter value and then value of column

  14. 14

    MySQL first select column based on parameter value and then value of column

  15. 15

    How to use column value in AS of SELECT FOR XML statement

  16. 16

    Get or select value out of xml column in SQL (Server) - remote function reference not allowed

  17. 17

    Trying to select a value from a field based on the value of a date field, where the first value is not NULL

  18. 18

    display field name as column and field value as row in sql server

  19. 19

    SQL select only rows with max value on a column

  20. 20

    Return mutiple value for on column in sql select

  21. 21

    How to replace the column value in select statement in Sql?

  22. 22

    sql - select rows with a distinct value in a specific column

  23. 23

    SQL select column value with biggest number of duplicates

  24. 24

    How to replace the column value in select statement in Sql?

  25. 25

    Sql select query based on a column value

  26. 26

    Select highest value from a column SQL

  27. 27

    Sql Query to select a column value with an aggregate funtion?

  28. 28

    Read XML Value in SQL Select Statement

  29. 29

    Read XML Value in SQL Select Statement

HotTag

Archive