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 2000 Forums
 SQL Server Development (2000)
 text file upload

Author  Topic 

thePhoolish
Starting Member

22 Posts

Posted - 2002-11-18 : 05:20:03
How can I upload the contents of a text file to a single field in a row?

I'm using a server hosted by an external company so I have limited access, I used the import/export wizard but I can't get it to update just 1 field



ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2002-11-18 : 08:09:51
Do you have access to DTS? If so you can do a data transformation to a stagging(temp) table and then run an update statement.

If not you can run import/export to a temp table and then run an update statement that only selects the field you need and updates your main field.

For inserting new records

Insert Into MainTable (FieldX)
Select FieldY
From
TableCreatedByImportText

http://www.sqlteam.com/item.asp?ItemID=277


For updating existing records from another table

http://www.sqlteam.com/item.asp?ItemID=3876






Go to Top of Page
   

- Advertisement -