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 |
|
padgettbrian
Starting Member
23 Posts |
Posted - 2012-02-21 : 12:17:19
|
| What the most compatible data type I can use to import data from a text file to SQL Server 2005?char, nvarchar, nvarchar(max), text ETC |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-21 : 13:49:54
|
quote: Originally posted by padgettbrian What the most compatible data type I can use to import data from a text file to SQL Server 2005?char, nvarchar, nvarchar(max), text ETC
depends on the type of values of coming in data and also maximum limitsafest option if unsure of type is to use character types like varchar,nvarchar. if you're sure maxlength will fall with 8000 limt use varchar(8000) or nvarchar(4000) if not go for BLOB types like varchar(max),nvarchar(max) Dont use text fields as its deprecated and have lots of restrictions also for use------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
padgettbrian
Starting Member
23 Posts |
Posted - 2012-02-21 : 15:53:49
|
| Been trying the import using BizTalk and SSIS tried it with a string [DT_STR] and 300 char limit but still get this message :( I ve seen the data and there's nothing in there passed 50 char. [Data Conversion 1 [1559]] Error: Data conversion failed while converting column "Column 328" (994) to column "Column 328" (2879). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.". |
 |
|
|
|
|
|