Wrox Programmer Forums
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 24th, 2006, 10:39 AM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Importing CSV

I am working on a project that needs to import a csv file once a week for sale leads into SQL Server 2000. This file is rather large. I also need to make sure no duplicate records are imported into the database and keep track of how many records are duplicates and how many records are new leads. Any ideas, suggestions, or a good tutorial on this? Anyone done something similar?
 
Old October 24th, 2006, 03:17 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

Lets say you have a cvs file name master

In your DTS Transform data Task Properties select SQL Query
and select a select statement
SELECT distinct [MASTER$].*
FROM [MASTER$]

In the Destination tab, select the table name you are importing to
and in the transformations tab map the columns from the cvs ( select statement from the source) to the database.

what you have done is queried the cvs file and selected the distinct data; just like query analyzer.


Jaime E. Maccou





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem importing CSV hman MySQL 0 January 6th, 2007 09:13 AM
Importing data from a CSV file? kr33 SQL Server 2000 26 January 3rd, 2007 02:38 AM
Importing a CSV file into SQL rsmuts ASP.NET 1.0 and 1.1 Professional 2 July 24th, 2006 10:14 AM
Importing data from CSV file g_vamsi_krish ASP.NET 1.0 and 1.1 Basics 2 May 23rd, 2006 01:29 AM
Importing data from .csv Spitzbucket PHP Databases 0 February 20th, 2005 01:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.