Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006

    Question Unanswered: OPen xml rowpattern probs!

    Hi All,

    I have this sql syntax which displays the records within the xml but instead of displaying 4 records (3 records relating to the last question ID) but instead resulting in only two records picking only the first options 'Unhelpful'.

    Definitely doing something wrong here, please advise!

    DECLARE @doc xml
    SET @doc =
    <QuestInfo Custref="18759" SubDate="2006-01-01T00:00:00"
    Polref="30018759" AgentID="4189" ClaimRef="14024-5647-890"/>
    <Ansoption />

    DECLARE @docHandle int

    EXEC sp_xml_preparedocument @docHandle OUTPUT, @doc

    SELECT *
    OPENXML(@docHandle, '/DivisionName/ClaimGroup/Questions/Answer/
    Ansoption', 2)
    (DVName varchar (20) '../../../../DVName',
    DvcodeNo int '../../../../DvcodeNo',
    CustSurveyNo int '../../../CustSurveyNo',
    ClaimGroupType varchar (20) '../../../ClaimGroupType',
    QuestionID int '../../QuestionID',
    AnswerID int '../AnswerID',
    Ansoption varchar (30)'Options')

    EXEC sp_xml_removedocument @docHandle

  2. #2
    Join Date
    Feb 2006
    Don't worry all sorted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts