Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-05-18 : 08:56:17
|
| Ryan writes "I am working on a stored procedure that takes a XML document and uses OPENXML to place it in a temporary table. The XML comes from an application that performs various system scans:INSERT INTO #tempSELECT * FROM openxml(@iTree, 'ComputerScan/scans/scan/scanattributes/scanattribute', 1)WITH (ID nvarchar(50) './@ID',ParentID nvarchar(50) './@ParentID',Name nvarchar(50) './@Name', scanattribute nvarchar(50) '.')The single period represents the values associated with each attribute. Each attribute has a unique attributeID. For example one of my scans returns all the windows updates installed. There is obviously more than one update and each update has a Name and a Description. All of these will be placed in a single column. My problem is that I have an Instances column that keeps track of each reoccurance of Name and Description. So the first Name is Instance '1' the second instance '2' third '3' and so on for Name and Description and the rest of my scans as well. I am not sure how to go about this and would appreciate any feedback." |
|
|
|
|
|