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 |
hazz1977
Starting Member
3 Posts |
Posted - 2007-01-25 : 09:50:40
|
hi,im trying to import ther following data into a sql table.column1 column223 ROW145 ROW2796 ROW345 ROW4WE ROW5FT ROW6HU ROW778 ROW8once the import completes rows 5-7 return a null valuecan anyone help?cheersHazz |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-25 : 09:52:16
|
Force the first column to be a VARCHAR/NVARCHAR column data type!The import wizard only examines the first few records to determine which datatype to use.Peter LarssonHelsingborg, Sweden |
 |
|
hazz1977
Starting Member
3 Posts |
Posted - 2007-01-25 : 09:57:34
|
i set the column to varchar and also tried setting it as nvarchar but it didn't help |
 |
|
sshelper
Posting Yak Master
216 Posts |
Posted - 2007-01-25 : 10:04:08
|
How are you importing the data? Is it from an Excel file? Since your first column contains a combination of numeric and alpha, your import application was able to determine that the data type of that column is numeric and anything that is not numeric it converts to NULL. There's an option that you can set in the connection string, called IMEX, where you can force it to convert everything to string.As an example of the IMEX parameter, refer to the following links:http://www.sql-server-helper.com/tips/read-import-excel-file-p02.aspxhttp://www.sql-server-helper.com/tips/read-import-excel-file-p03.aspxSQL Server Helperhttp://www.sql-server-helper.com |
 |
|
hazz1977
Starting Member
3 Posts |
Posted - 2007-01-25 : 10:46:14
|
thanks for that.do you know if there are any changes that can be made within the SSIS package to acheive the same result. i.e by editing the data type column properties? |
 |
|
|
|
|