Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a web developer with a bit of DB experience, but this one is beyond my knowledge.

We're trying to set up a new website. The data - products, prices, descriptions etc - are supplied by an external company in either .XLS, .CSV or XML format. This data is updates & distributed regularly, eg each month.

I could simply import all the data each time - the problem is we don't necessarily need all the products, so we would mark them as "unavailable" or something by creating a new field in the DB.

So, next time the data is provided, I need to import it again - but making sure it doesn't overwrite our "available" field.

My initial thought was to create 2 tables - one, "Products" which I would import the data into each time and a new table "availability" just with 2 fields - product ID and an available - yes/no field and join the tables on the product ID.

Is this a sensible approach? can XML files be read directly from SQL Server without importing?

share|improve this question

You can import your data into a staging table then update the product reference data from that. The product table can hold your 'available' flag. Unfortunately you will have to import the XML data into SQL Server to load it, but SSIS has an XML reader, so you can use that to do the imports.

share|improve this answer
+1 for the staging table suggestion. – jl01 Mar 20 '12 at 13:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.