March 27, 2008 at 3:08 am
Hi
Here is a sample code which creates a stored procedure and executes the xml against that in query analyzer. Just follow the steps and modify the code as it suits to you once u throogh the output.
1) Create Procedure...
CREATE PROCEDURE [dbo].[Study_SaveData](
@studyDataXML XML
)
AS
BEGIN
SELECT StudyTab.StudyCol.value('StudyParID[1]','int') AS StudyParID,
StudyTab.StudyCol.value('TPID[1]','int') AS TPID,
StudyTab.StudyCol.value('DataValue[1]','float') AS DataValue
FROM @studyDataXML.nodes('//StudyDataList/StudyData') AS StudyTab(StudyCol)
END
2) Run the procedure like this.......
EXEC [dbo].[Study_SaveData]
'
'
bingo ........ go ahead and modify the code to suite your needs.
Regards
Srinivas Chilakapati
March 28, 2008 at 3:42 am
Refer below URLs as well.
http://www.sqlservercentral.com/articles/Stored+Procedures/2977/
http://weblogs.sqlteam.com/jeffs/archive/2007/06/26/60240.aspx
Thanks,
MH-09-AM-8694
Viewing 2 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply