Loading space delimited data from flat file to SQL Server database.

Posted on 2006-05-17
Last Modified: 2008-02-01
I have to download data file (with records of not relational, not normalized data) from FTP server and load the data into SQL Server database. What are different ways of accomplishing the task? Tools available: SQL Server 2000 and Visual Studio .Net 2003 . Thank you.
Question by:quasar_ee
    LVL 5

    Accepted Solution

    Hi quasar ee,

    You can SQL DTS to create a process that can be scheduled to accomplish this task. One way to do this is to go to Enterprise Manager and right-click on the database you want to import the data into. Select [All Tasks] --> [Import Data] and follow the wizard to select your datasource (TEXTFILE), destination, etc... At the end you can choose to save the task as a DTS Package.

    Once you have the data in SQL Server, you can create a stored procedure to take the data and move it into the appropriate tables in your database.

    LVL 75

    Expert Comment

    by:Anthony Perkins
    Friendly reminder: The following questions are well past abandoned, please attend to them:

    1 03/22/2006 250 Generating select, insert, update, delet...  Open Microsoft SQL Server
    2 04/03/2006 125 Can I somehow generate insert statements...  Open Microsoft SQL Server

    LVL 75

    Assisted Solution

    by:Aneesh Retnakaran
    Also you can use  BCP / Bulk insert  for the same purpose..

    Author Comment


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
    Viewers will learn how the fundamental information of how to create a table.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now