Retrieve Data from XML Field of a table

  • Guys hi,

    i have a table called filteredarticle that has an xml column named articlexml. From this column i want to retrieve the text.

    How can i do it ?

    Can you help pls?

    Regards,

    DF


    "If you want to get to the top, prepare to kiss alot of bottom"

  • [font="Verdana"]OPENXML will help you in such case.[/font]

    MH-09-AM-8694

  • Look into using the NODES method. Here's an example from BOL:

    SELECT C.query('.') as result

    FROM Production.ProductModel

    CROSS APPLY Instructions.nodes('

    declare namespace MI="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions";

    /MI:root/MI:Location') as T(C)

    WHERE ProductModelID=7

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply