This blog is created to add all the information and experiences that I have learnt while working on MS sql server as a DBA. The blog is also updated frequently with the real world problem that I encounter hands on at work and the resolutions to resolve them. I hope this blog will be of some use to you and you will revisit. Thank you for stopping by and you are welcome to leave comments.
Tuesday, January 10, 2023
Insert null value in Database through SSIS
The inbound file had empty string that was causing the file to error when it was trying to insert in the DOB column of the table with the data type on datetime. I used a dervied coulum in the DFT and used the following the the data tranformation editor to solve the error
ISNULL(DOB) || TRIM(DOB) == "" ? NULL(DT_DBDATE) : (DT_DBDATE)DOB
When the file was loaded the DOB column had NULL for the empty value.
Labels:
data import,
data transformation editor,
datetime,
SSIS
Subscribe to:
Posts (Atom)