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.
Showing posts with label data import. Show all posts
Showing posts with label data import. Show all posts
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
Monday, April 2, 2018
How to read mixed data type from excel file in SSIS
To fix the issue where SSIS was reading mixed data type wrong from an EXCEL file I had to change the registry information
I had a file where the source file had account numbers where some rows had value as integer and some had alpha numeric character. When the account number had first few rows as integer the remaining rows with the alphanumeric account number value was not getting read and the value was getting imported as NULL. I followed the following steps to fix this issue in EXCEL 2012 .
I had a file where the source file had account numbers where some rows had value as integer and some had alpha numeric character. When the account number had first few rows as integer the remaining rows with the alphanumeric account number value was not getting read and the value was getting imported as NULL. I followed the following steps to fix this issue in EXCEL 2012 .
- In Windows environments, select Start ► Run and type REGEDIT to display the Registry Editor.
- In the registry tree, select HKEY_LOCAL_MACHINE ► Software ► Wow6432Node ► Microsoft ► Office ► 14.0 ► Access Connectivity Engine ► Engines.
- Double-click the Excel node.
- In the right panel, double-click the TypeGuessRows entry.
- Change the value data from 8 to 0.
- Click OK.
- Select File ► Exit to exit the Registry Editor window.
Subscribe to:
Posts (Atom)