I want to load a data file into the SQL Server database using the BCP command.
The Data file has some data as NULL(string) or NA but the columns type in the database is numeric. e.g
ABC|TEST DRUG 10A|ADBC|true|200.0000|EA|false|2020-10-24|true|NP|0|NA|NA|NA|NA|NA|NA|B|NA
I want to handle it during loading such that data going inside the database is ''.
I tried the normal as well native approach, but it's failing.
I have two alternate in my mind but still another way round
- Change destination data type from numeric to varchar for handling null values.
- Kindly check with the data source and get 'NA' & 'NULL' keywords replaced with blank spaces.
Can someone suggest me a better approach Thanks in advance