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.
Author |
Topic |
parrot
Posting Yak Master
132 Posts |
Posted - 2012-12-30 : 13:05:45
|
I am trying to import a delimited flat file data source into a table that I have created with the desired attributes using SQL Server Management Studio. I started by exporting the table as a flat file. Then I created the table definitions on the new database. Then I imported the flatfile source into my new table but it gives me an error that the table is already defined. If I don't define the table ahead of time, the flat file will just create a varchar(50) attribute for every field item. So how can I import a table from a delimited flat file into a table with an existing definition so I can retain the proper field definitions?Dave |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2012-12-30 : 16:53:22
|
Are you importing it somehow as SELECT * INTO AlreadyCreatedTable instead ofINSERT INTO AlreadyCreatedTableSELECT *FROMJimEveryday I learn something that somebody else already knew |
|
|
parrot
Posting Yak Master
132 Posts |
Posted - 2012-12-30 : 17:48:32
|
I am importing under the tasks menu item as a flat file which only has comma delimited data. I am not running any script. I know that in MYSQL you can use a LOAD DATA INFILE command but there is no such command that I know of in Microsoft SQL. I tried to use a LOAD DATA INFILE command in a script and got an error. Is there an SQL script command that allows me to upload data from an input file? |
|
|
|
|
|