Insert XML into SQL Server database

Explorer ,
Sep 15, 2017 Sep 15, 2017

Copy link to clipboard

Copied

Hi,

I need to insert an xml file data into a SQL Server database table using Cold Fusion 11.

I have an SSIS package on the SQL Server that inserts the data.

Is there a way to execute the SSIS package in Cold Fusion?

Is there a SQL statement to insert the data with out using the SSIS package in Cold Fusion?

Thanks in advance,

Mike

Views

797

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 21, 2017 Sep 21, 2017

Copy link to clipboard

Copied

I don't think you can execute an SSIS package from ColdFusion.  Why can't you just execute the package from SSIS?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 22, 2017 Sep 22, 2017

Copy link to clipboard

Copied

Hi,

I need to validate the data sent into the application by inserting the data into a table and checking the information against another table.

The process would let the individuals know of any issues with the data sent.

Thanks,

Mike

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 05, 2017 Oct 05, 2017

Copy link to clipboard

Copied

LATEST

Process XML data using OPENXML function

USE OPENXMLTesting

GO

DECLARE @XML AS XML, @hDoc AS INT, @SQL NVARCHAR (MAX)

SELECT @XML = XMLData FROM XMLwithOpenXML

EXEC sp_xml_preparedocument @hDoc OUTPUT, @XML

SELECT CustomerID, CustomerName, Address

FROM OPENXML(@hDoc, 'ROOT/Customers/Customer')

WITH

(

CustomerID [varchar](50) '@CustomerID',

CustomerName [varchar](100) '@CustomerName',

Address [varchar](100) 'Address'

)

EXEC sp_xml_removedocument @hDoc

GO

Learn more scenarios by learning SQl Server Course !!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines