Home All Groups Group Topic Archive Search About

Problem with Dates and OpenXML command

Author
3 Nov 2005 10:42 PM
Paul Barnett
My data is being updated correctly for all fields except a date field.
The program is crashing when a date is encountered with OpenXML. Is
there a way to convert the date within SQL to handle this...I have tried
the CONVERT statement below, but it does little



UPDATE EducationSheetSchool
SET
EducationSheetSchool.Address= XMLEducationSheetSchool.Address,
EducationSheetSchool.[Name]= XMLEducationSheetSchool.[Name],
EducationSheetSchool.LEA= XMLEducationSheetSchool.LEA,
EducationSheetSchool.Tel= XMLEducationSheetSchool.Tel,
EducationSheetSchool.Email= XMLEducationSheetSchool.Email,

EducationSheetSchool.Start=CONVERT(varchar(30),XMLEducationSheetSchool.S
tart, 126),

*** Sent via Developersdex http://www.developersdex.com ***

Author
5 Nov 2005 7:52 PM
Adam Machanic
Can you show a sample of the XML and the OPENXML syntax you're using?


--
Adam Machanic
Pro SQL Server 2005, available now
www.apress.com/book/bookDisplay.html?bID=457
--


Show quote
"Paul Barnett" <barnettp***@gmail.com> wrote in message
news:eCtAwfM4FHA.1188@TK2MSFTNGP12.phx.gbl...
>
>
> My data is being updated correctly for all fields except a date field.
> The program is crashing when a date is encountered with OpenXML. Is
> there a way to convert the date within SQL to handle this...I have tried
> the CONVERT statement below, but it does little
>
>
>
> UPDATE EducationSheetSchool
> SET
> EducationSheetSchool.Address= XMLEducationSheetSchool.Address,
> EducationSheetSchool.[Name]= XMLEducationSheetSchool.[Name],
> EducationSheetSchool.LEA= XMLEducationSheetSchool.LEA,
> EducationSheetSchool.Tel= XMLEducationSheetSchool.Tel,
> EducationSheetSchool.Email= XMLEducationSheetSchool.Email,
>
> EducationSheetSchool.Start=CONVERT(varchar(30),XMLEducationSheetSchool.S
> tart, 126),
>
> *** Sent via Developersdex http://www.developersdex.com ***

AddThis Social Bookmark Button