Convert notes data to sql table usage

  • Hi

    We have some notes data that I am supposed to put into a ms sql table.

    The notes data look something like this.

    511;102;106;0601;50040;201101;2011;0;0,5;0

    511;102;106;0601;50040;201102;2011;0;0,5;0

    511;102;106;0601;50040;201103;2011;0;0,5;0

    I now have them imported to my sql server in one table with one collumn.

    The ; indicates a new collumn.

    What would be the best and easiest way to make this in table manner.

    Comments please?

    Dan

  • Personally, the easiest would be to put SQL Server Integration Services to work on it. SSIS can do this type of break down quite easily.

    Another option, not as easy, would be to use SQLCMD.exe. You can define the column & row delimiters and import the data that way.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • So you want to break apart this delimited string (with the ; being the delimiter) into separate fields? If I'm understanding this correctly, click here for the latest Delimited Split Function.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply