November 9, 2022 at 2:44 pm
Hi All,
In MSSQL How can I handle null values for integer column. Do I need to update null to zero maybe?
I am doing BCP out from MSSQL to MYSQL.
The text file is having null-empty values and MYSQL load is errors out with Incorrect integer value.
November 9, 2022 at 4:36 pm
You could add a step to update your file before the BCP.
or
In your select, you could use a CASE statement to replace NULL with 0
SELECT
CASE WHEN FIELD1 is NULL then 0 ELSE FIELD1 END
, FIELD2, FIELD3
from MYFILE
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy