I have a simple ETL from CSV to SQL Table.
Here is the current workflow (see picture attached)
Here is the problematic csv data
ID | Name | Number |
---|---|---|
1 | Jone | 345 |
2 | Jane | 222 |
3 | Phil | ? |
Data type for Number is Integer. So obviously Phil is throwing an error
Now I want to always replace "?" with zero . I have a plan in my head, but I don't know how to execute it. My plan is to load the CSV into a Temp table.And just run a Replace command, But I don't know where to start.
select Replace(Number, '?', '0') "Number" from Temp_Table1
How do I do that?
also open for other suggestion. But I need to be able to automate the clean up of "?"
Create a permanent staging table in your database.
Then in your control flow