Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Importing single field into table

Author  Topic 

domo
Starting Member

23 Posts

Posted - 2008-02-01 : 06:38:17
I need to get the value 'TeamName' from a CSV file into field 'TeamName' in SQL. 'ID' is the link between CSV file and sql table.

CSV File columns = ID, TeamName

Destination Table columns = ID,Company,Contact,Address,TeamName

Is this possible?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-01 : 08:21:21
You need to specify the transformation in transformation tab of DTS to map only TeamName->TeamName. I hope you are using DTS for data transfer.
Go to Top of Page

domo
Starting Member

23 Posts

Posted - 2008-02-01 : 08:35:26
I've used DTS in the past - I'll give it a go!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-01 : 08:38:29
Cool. That should do the trick. If you find any problems,let me know.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-01 : 08:41:29
You can also use export/import wizard in enterprise manager to achieve this.
Go to Top of Page

domo
Starting Member

23 Posts

Posted - 2008-02-01 : 10:32:35
quote:
Originally posted by visakh16

You can also use export/import wizard in enterprise manager to achieve this.


I assume the same applies to Management Studio in SQL2005?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-01 : 10:37:40
Yeah Sure. You have export/import in sql 2005 SSMS also. Go to your db, right click select tasks-> import data or export data and wizard opens up.
Go to Top of Page
   

- Advertisement -