How to XML to SQL table

How to XML to SQL table

Comments

  • Hi,

    We’ve got a flow that loads a set of XML files from a Directory and reads them as text files and parses the information with the XPath Query step.
    The XPath Query step returns an array of strings. We’d like to then insert the information returned by the XPath Query step into a SQL database.
    Because XPath Query returns an array of strings we don’t know how to match that information with the SQL database step.
    Could he have some assistance with that?

    Thanks.

  • Hi

    Please send an example of the xml data I will make an example for you.

    Thanks.

  • DTSControl

    Version1.0 Version
    AddressType ALL AddressType
    MessageType Data MessageType
    From_DTS RH5HC001 From_DTS
    To_DTS RH5HC001 To_DTS
    From_ESMTP rh5hc001@dts.nhs.uk From_ESMTP
    To_ESMTPrh5hc001@dts.nhs.uk To_ESMTP
    Subject TEST Subject
    LocalId SomparTest01 LocalId
    DTSId 20171108133410008352_2E32FF DTSId
    PartnerId PartnerId
    Compress Y Compress
    Encrypted N Encrypted
    WorkflowId TOC_DISCH_DMS WorkflowId
    ProcessId ProcessId
    DataChecksum DataChecksum
    IsCompressed N IsCompressed
    StatusRecord
    DateTime 20171108133410 DateTime
    Event TRANSFER Event
    Status SUCCESS Status
    StatusCode 00 StatusCode
    Description Transferred to recipient mailbox Description
    StatusRecord

    DTSControl

  • And this is the select from our table.

    SELECT TOP 1000 [Id]
    ,[LocalID]
    ,[MessageDTSId]
    ,[MessageType]
    ,[SenderCode]
    ,[RecipientCode]
    ,[WorkflowID]
    ,[Event]
    ,[Status]
    ,[StatusCode]
    ,[EventDateTime]

    FROM [MESH].[dbo].[MessageStatusAudit]

Sign In or Register to comment.