[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

Parse comma seperated field value into seperate columns

Asked by newbreedcc in MS SQL Server

Tags: comma, seperated, values, parse

Hi guys,

I receive a raw import file, which I pump into a staging table, then I need to import into my prod table, one of the fields (column) in my staging table contains multiple values (comma seperated), my task is to parse these values into seperate columns of my prod table.

I found a helper function and wrote a stored proc that do that runs recursively for all the records... however........ it kindof works but it's way too slow for the amount of records im planning to import... hence I need your help...

The data contains vehicle options... the import value I receive should be limited to 35 comma seperated values,
which I then parse into columns o1 to o35 (value can also be empty).

Here's sample of the imported comma seperated column value:
Central Locking,Black 5 x 7 exterior mirrors,Tinted glass,Variable intermittent windshield wipers,300MPH:),120 MPH primary speedometer,Electronic AM/FM stereo radio w/cassette (4) speakers,Cigar lighter,Dual cloth covered sun visors w/RH mirror,600-amp maintenance-free battery,117-amp alternator,High strength 30000 PSI carbon steel frame,6.5'' pickup box-inc: double wall construction 2-tier loading,Independent front suspension,HD front/rear shock absorbers,Front stabilizer bar,Conventional spare tire & wheel w/winch-type carrier,Pwr rack & pinion steering,Rear anti-lock brakes,Dual note electric horn,Flat Screen Monitors,Funky Interior

Which should import into the following columns:
o1      o2      o3      o4      o5      ect.....
Central Locking      Black 5 x 7 exterior mirrors      Tinted glass      Variable intermittent windshield wipers      300MPH:)              ect....

The above is an example of one VIN (vehicle), I can import up to 10,000 records at a time and would like that to happen in like less than 10min if possible, at the moment it takes well over 3 hours.

If you need to see the code I have so far let me know, if you have your own function or sp that I can use that would be great,
Thanks!

[+][-]03/06/06 08:08 AM, ID: 16115490Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/06/06 08:11 AM, ID: 16115520Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/06/06 08:12 AM, ID: 16115526Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/06/06 08:13 AM, ID: 16115534Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/06/06 08:20 AM, ID: 16115614Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03/06/06 02:02 PM, ID: 16119071Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/06/06 03:05 PM, ID: 16119665Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: MS SQL Server
Tags: comma, seperated, values, parse
Sign Up Now!
Solution Provided By: nmcdermaid
Participating Experts: 2
Solution Grade: A
 
[+][-]03/06/06 08:38 PM, ID: 16121219Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/08/06 12:18 AM, ID: 16130993Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81