Home Forums SQL Server 2008 SQL Server Newbies Setting a Primary key to subsequential Data (Header - Line) RE: Setting a Primary key to subsequential Data (Header - Line)

  • dwain.c (9/18/2012)


    Now I'm fairly sure someone is going to think that I'm crazy and perhaps I am, but why not use XML for this?

    Let's set up the incoming data just slightly differently:

    :hehe: Jeez, Louise! What was I thinking! :w00t:

    I must have too much spare time on my hands.

    Dwain, that's pretty cool, but a question. How do you confirm you're getting the information out of the table in the same order it was in the file? Due to the lack of confirmed ordering, I fear this might be dangerous.

    HOWEVER... errr, no, that's right, no SSIS. BUT, you could deliver the fully built XML from your custom code to SQL, and then run with Dwain's solution... which I admit is pretty frickin' neat.

    Also, you can use XML as a datatype for a proc, so you would simply call the proc with the code-constructed XML and go from there.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA