![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
So someone please tell me what does import from a CSV file to SQL 2000 as a NULL> value? I use two delimiters with nothing between: |
#3
| |||
| |||
|
|
"Jamie Carper" <JamieCarper (AT) discussions (DOT) microsoft.com> wrote in message news:03F97F45-6D7C-4608-88CC-0518A8234B9C (AT) microsoft (DOT) com... So someone please tell me what does import from a CSV file to SQL 2000 as a NULL> value? I use two delimiters with nothing between: field1,field2,,field4 (field3 is null) And I make sure there's no default for the field on an INSERT. The alternative would be an ActiveX script on the transform for the column. Test for some particular value in the source and set the destination to null if it matches. I use something like this for fixed field files, where there are no column delimiters. I translate blanks in a numeric field to zero, but it could as easily be null. Jack Peacock |
#4
| |||
| |||
|
|
I am using the alternative you spoke of. Which is why I have posed the question. When I use Replace(xxxxxx, Chr(46), Chr(0)), if the type I am transforming to is an integer, I get the NULL value. However if I the field is a char of any type I get some unknown character. I then have to run a separate SQL UPDATE statement to find this mystery character and replace it with a NULL. A NULL value means that no valid data has been stored in the column. An |
![]() |
| Thread Tools | |
| Display Modes | |
| |