How to import null string as null mark in csv files using ssis package

How to import null string as null mark in csv files using ssis package
csv file have values :
id |name |deptno | sal
1 |a |NULL |NULL
2 |b |NULL |NULL
3 |c |NULL |NULL
NULL|d |10 |NULL
type of file : csv comma separated values

Target table emp :
id |name |deptno | sal
1 |a |NULL |NULL
2 |b |NULL |NULL
3 |c |NULL |NULL
NULL|d |10 |NULL

Here i am not getting db null values and its getting string null values



output
expected output like below:
expeted output

how to resolve null values issue in ssis package side

Please don't double post. The original post is Getting error when loading null values in ssis. As we said in the other post, it is not null in the csv, it has the words NULL in it so it is reading as a string. If it were csv, the file should look more like this:

1 |a ||
2 |b ||
3 |c ||
|d |10 |

You'll probably have to read it like a string, then convert 'NULL' to null

1 Like