import a txt file in sqlserver

  • hi,

    is it possible to import a text file in sql server?

    in fact i have a list of data in a text format that i wanted to add to a table in my sqlserver.

    how can i do it?

    As in Access where you can import data is that possible with sqlserver?

  • Yes, there are many different ways to do this. You have the Import/Export data wizard, bulk insert commands, bcp and SSIS.

    If its going to be a 1 time thing then look at using the Import/Export data wizard, if its going to be a frequent process, I would look at using something like SSIS (or Import/Export data wizard saving the package the modifying it) to create a custom based solution which will work within your environment.

  • hi,

    i am using MSsql server management studio

    Is that wizard integrated?

    i have looked all over and i can't find it

    thx

  • Yep it is. If you right click the database you wish to import into, then in the tasks menu you should see Import Data.

  • Merci

    I do not look that way

    I have made it

  • Not to worry, it is quite a hidden option in all fairness. If you ever need to do anything a bit more complex or frequent I would look at learning SSIS, its the bigger brother of the Import/Export data wizard.

  • Another option is to use our (free) app called ClipTable, which, in many cases, saves you a *lot* of headache when trying to import pretty much anything into SQL Server.

    http://www.doccolabs.com/products_cliptable.html

  • Adi@Wrk (5/14/2012)


    Another option is to use our (free) app called ClipTable, which, in many cases, saves you a *lot* of headache when trying to import pretty much anything into SQL Server.

    http://www.doccolabs.com/products_cliptable.html

    Sounds very useful especially on qucik spreadsheet jobs. You should write an article on it and submit it to this site especially since it's free. It'll give you a whole lot of visibility.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • marclas (5/10/2012)


    hi,

    is it possible to import a text file in sql server?

    in fact i have a list of data in a text format that i wanted to add to a table in my sqlserver.

    how can i do it?

    As in Access where you can import data is that possible with sqlserver?

    If it's something you need to do more than once and the file is in reasonably good shape, I prefer the wiles of BULK INSERT. And, yeah... it's nasty fast. SSIS uses the same "engine" except it can all be done through a nice little scheduled or ad hoc called stored procedure.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 9 posts - 1 through 8 (of 8 total)

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