Friday, February 24, 2012

Integration Services Data Types

Hi, I have a question regarding the Integration Services Data Types.

From http://msdn2.microsoft.com/en-us/library/ms141036(d-printer).aspx, I found a table that shows me the Mapping of Integration Services Data Types to Database Data Types.

For example, how the DT_BOOL Data Type maps to bit for SQL Server.

In this case, I am okay, as I know exactly what the mapping is, however, for some of the datatypes, I do not.

Here is an example. The DT_CY datatype maps to smallmoney and money ... how do I know which one to map to? For me, which one I map to does indeed matter because their representation is different.

DT_NUMERIC maps to decimal and numeric ... this one does not matter as much

DT_STR/DT_WSTR ... I need to know whether its char, varchar, ncahr, or nvarchar for padding purposes mostly.

Any help would be gladly appreciated.
As for DT_CY, you pick. Either will work.

DT_STR = varchar, char
DT_WSTR = nvarchar, nchar|||From what I am doing with the values, I can not just pick for DT_CY. I need to know whether it is actually smallmoney, or money.

Same goes with DT_STR and varchar, char ... I need to know whether its one or the other.

And similarly for nvarchar/nchar for DT_WSTR.

I am passing these values to an application that needs to know what is what because it treats each value differently.

|||

theddern wrote:

From what I am doing with the values, I can not just pick for DT_CY. I need to know whether it is actually smallmoney, or money.

Same goes with DT_STR and varchar, char ... I need to know whether its one or the other.

And similarly for nvarchar/nchar for DT_WSTR.

I am passing these values to an application that needs to know what is what because it treats each value differently.

You are on the wrong end of the question though.

YOU have to decide which SQL Server data type best fits the data. SSIS doesn't dictate that; you do.

So yes, you have to pick and stick with it. Do you understand the differences in the SQL Server datatypes? You might not ever use char/nchar (retains trailing spaces) so that might solve that issue for you. DT_CY, well, you just need to know what the data supports and choose the correct one.|||Alright thanks

No comments:

Post a Comment