Importing text file into database

Last post 04-03-2007 6:03 AM by rbunn83815. 3 replies.

Sort Posts:

  • Importing text file into database

    03-31-2007, 11:46 PM
    • Loading...
    • rbunn83815
    • Joined on 02-02-2007, 3:38 AM
    • Posts 87

    Hello Everyone,

     I would like to import a text file which contains one string (a large integer) per line not separated by commas or anything else except a carriage return.  Does anyone know of an easy way to store this in a database file?  I'm open to suggestions if there is more than one way to save this kind of information within a database.  I have SQL server 2005 developer edition if that helps in any way.  I'm also starting to learn about Linq so if there is some other way you would store this information for that purpose I would love to hear about that as well.  C# code is preferable, but I can use the automatic translators if that's all you have.  By the way, I'm a newbie to this subject (if you couldn't tell).  Thanks in advance.

                                                                                                                                    Robert

    On the border of insanity and reason lies the realm of genius.
    Filed under: , , , ,
  • Re: Importing text file into database

    04-01-2007, 4:25 AM
    Answer
    • Loading...
    • khtan
    • Joined on 03-20-2007, 6:40 AM
    • Posts 78

    check out

    - BCP

    - Bulk Insert 

    KH
  • Re: Importing text file into database

    04-01-2007, 7:59 PM
    • Loading...
    • rbunn83815
    • Joined on 02-02-2007, 3:38 AM
    • Posts 87

    Your answer looks promising after a review of the information about it.  I'll try it out and if it works then close this post.  Thanks for your suggestion.

                                                                                                                                    Robert

    On the border of insanity and reason lies the realm of genius.
  • Re: Importing text file into database

    04-03-2007, 6:03 AM
    • Loading...
    • rbunn83815
    • Joined on 02-02-2007, 3:38 AM
    • Posts 87

    Hello Everyone,

          I did try this and I was amazed to find out that you can import plain text files straight into excel or access.  Obviously with an access database in hand using it with SQL server 2005 should be straightforward.  Thanks for your help.

     

                                                                                                                   Robert

    On the border of insanity and reason lies the realm of genius.
Page 1 of 1 (4 items)
Microsoft Communities
Page view counter