For the life of me I cannot figure out what's wrong with my SP. I'm receiving an XML document with a bunch of invoices like
And I need to write each invoice as a record in SQL Server 2005
I'm getting the following error
Msg 170, Level 15, State 1, Procedure pcdAddInvoices, Line 39
Line 39: Incorrect syntax near '.'.
CREATE PROCEDURE pcdAddInvoices
-- Add the parameters for the stored procedure here
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
INSERT INTO [Promacoin].[dbo].[Tblinvoices_DAX] (ObjectID,ActivityID,ResourceID,ContractID,Document
SELECT M.Invoice.value('/ObjectID','NVARCHAR(16)') AS ObjectID,
View Complete Post