I am using SQL Server 2005 Express. I want to pass an xml parameter into a stored procedure and have it's contents inserted into a table. I also need to be able to insert a pair of fixed values, the ID of the parent row and the customer's ID, into the table along with each line from the XML. I have tried for over a week to figure this stuff out and have been unable to reverse engineer what I have found.This so far is what I have (the first set of parameters is for the parent row):ALTER PROCEDURE [dbo].[InsertMMChildCartItemtest]( @customerNumber int, @productID int, @quantity smallint, @price decimal(6, 2), @dateUpdated smalldatetime, @children xml /****** <Products><product><id>11</id><quantity>2</quantity><date>10/10/10</date></product><product><id>12</id><quantity>3</quantity>date>10/10/10</date></product></Products> ******/)AS BEGIN SET NOCOUNT OFF; DECLARE @id int DECLARE @childTable TABLE ( productID int, quantity smallint, price decimal(6, 2) ) /******Insert the parent per the parameters and grab its new ID ******/ INSERT INTO [dbo].[cartTable] ([customerNumber], [productID], [quantity], [dateUpdated]) VALUES (@customerNumber, @productID, @quantity, @dateUpdated) SET @id = SCOPE_IDENTITY() END /******Insert the child rows, with some values comming from the parameters, some from the XML INSERT INTO @childTable SELECT @children.query('/Products/product') INSERT INTO [dbo].[cartTable] SELECT @customerNumber, CT.productID, CT.quantity, CT.price, @id FROM @childTable as CT ******/Ideas?