Common data-type conversions between SQL Server, Oracle, Sybase ASE, and DB2.

SQL Server includes a little-known, but handy, function that can show you common data-type conversions for a target system; useful for ETL between disparate systems.

Run this code:

The above code returns a result-set with over 300 rows showing how data types such as money map from Oracle into SQL Server, etc. You can pass in desired types for the systems you’re interested in, and get a single row showing you the appropriate type for the target system.

The function itself is defined as:

Microsoft Docs has very light documentation on this function in their host integration documentation.

We hope you found our post on common data-type conversions useful. Please consider taking a look at the rest of our posts on Documentation.