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
 General SQL Server Forums
 New to SQL Server Programming
 Help with importing data

Author  Topic 

Yellowdog
Starting Member

34 Posts

Posted - 2008-12-15 : 13:08:19
I need some help importing data. The import wizard seems to be the easiest way to import data into a database but it also seems to be really buggy. The suggest data type method does not seem to work at all... It is default to nvarchar and our comapny uses varchar for most of its data. All in all, it seems that the import wizard is not as user friendly as it probably could be.

I am trying to import a tab delimited txt file which seems to be a really easy task until I go ahead and try to import it. The problem I am running into is the data types that get assigned to the actual data.

So simply put is there an option that I can use to set all the data to varchar instead of nvarchar and also can set all to 1000?

I know this is not the best way to handle the problem, I just need to get the data into our system.

Even better is there a bulk insert statement that I can use that will give header names without going through the file and typing it all in?

Sorry if this is a stupid question, I just am at a loss as to how I can get this data in in a quick and dirty way.

Thanks in advance

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-15 : 13:22:05
try this

http://msdn.microsoft.com/en-us/library/ms178129.aspx
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-12-15 : 14:22:03
Use Data Conversion task in between to satisfy data type need.
Go to Top of Page
   

- Advertisement -