Home Forums Programming XML Issue ,Getting Only One Child Node by sp_xml_preparedocument. RE: Issue ,Getting Only One Child Node by sp_xml_preparedocument.

  • Like this

    SELECT

    A.*

    FROM

    OPENXML(@Payrollhandle,'/Payroll/Doctor/WorkDays/Office',8)

    WITH (DoctorID INT '../../@ID',

    StartDate DATE '../../../@StartDate',

    EndDate DATE '../../../@EndDate',

    WorkDaysOfficeID VARCHAR(10) '@ID',

    WorkDays INT '.'--,

    --AsstDaysOfficeID VARCHAR(10) 'AsstDays/Office/@ID',

    --AsstDays INT 'AsstDays/Office' ,

    --PTODaysOfficeID VARCHAR(10) 'PTODays/Office/@ID' ,

    --PTODays INT 'PTODays/Office'

    )

    AS A

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537