Right so I'm a complete noob when it comes to SQL so expect my explanation to be sub par, anyway, onto the question.
We have the usual customer 'database' in Excel of course that needs to be migrated to SQL (MS-SQL). The problem comes with a table that stores:
[PrimaryKey] [ProductID] [PriceID] [Price]
[ProductID] can have multiple [PriceID]s
The Excel file on the other hand comes in the format:
[Product Number] [Price1] [Price2] [Price3] ... [PriceN]
I tried with a query (both for update and insert new data) that did it all in one go. But it took forever.
Now I'm trying with a while bucle 1 row at a time, it is still taking forever (forever as in 1hr.+) but its only 30,000 rows of data (well 30,000 * PriceN) but still I don't think its too much data for it to take so long. Hell I could just transpose the data in Excel in 20 minutes of work or work something out with the import package thingie.
Basically wondering if there is an easier/faster way to do the import with a query; or if you know of a forum/site/book to un-noob myself it'll be appreciated.
Edit: Ok so the bucle method took 30 or so minutes to show some results.
XI Wiki


