Solved

SQL Server 2008 XML Question

Posted on 2011-03-03
3
216 Views
Last Modified: 2012-06-27
Hi,

I am currently using a linked table (primary key and foreign key) to hold metadata about my product inventory. The metadata gets a little unwieldy and I am able to have it logically relate to the product it is based on. I am thinking of using an xml fragment to represent the metadata for each product.

1) I would like to know if I should store the metadata in the same table, and will it slow down query processing if I do keep it in the same table.
2) Can you point me to an example of code to update an xml column without having to rewrite the contents?

Example

<metadata>
  <color>green</color>
  <color>blue</color>
</metadata>

What would I need to do to add the color red to this fragment?

Thanks In Advance!!!
0
Comment
Question by:dilithiumtoys_dot_com
  • 2
3 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 35029425
>>  2) Can you point me to an example of code to update an xml column without having to rewrite the contents?

http://msdn.microsoft.com/en-us/library/ms345122(v=sql.90).aspx

There is an example toward the bottom of the page under "Example: Inserting a skill."
0
 

Author Comment

by:dilithiumtoys_dot_com
ID: 35031999
Thanks Kaufmed, that does answer a part of my question
0
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 35035556
>>  that does answer a part of my question

I understand. That's the only part I knew the answer to   = )
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQL Query Assistance 4 31
SQL Select Query help 3 31
Creating Alerts in sql sever 2 13
affinity mask in sql server 1 6
Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now