Link to home
Start Free TrialLog in
Avatar of awarraic
awarraicFlag for United States of America

asked on

How to import data from a text file to an already existing table in SQL Server 20005

How to import data from a text file to an already existing table in SQL Server 20005.
I tried "Tasks" --> "Import Data" --> SQL Server Import and Export Wizard.

I didn't find any option where I can choose a destination table. Table already exists but in Wizard, how do I skip column names?

in my text data, I have all the data in the right order.

Example:
abc123,TestLName,TestFName,,Staff,abc123@xxx.edu,12345678,,,,,,,,,,Yes,,123 abc road,San Marcos,TX,487574,NULL,,,,,,,,,,,,,,,,,,LDAP
ASKER CERTIFIED SOLUTION
Avatar of mstrelan
mstrelan
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Derek50
Derek50

When you're in the import wizard after you choose your destination database, you have a Select Source Tables and Views window.  In the Destination column, change your table name to the table you want to import to.  Then click Edit Mappings. Here you should be able to specify your destination column (make sure Append rows to the destination table is selected).  If you don't want a source column to import, leave it as 'ignore'.