dbTalk Databases Forums  

sql_variant and SQL Server 2005 Integration Services (DTS)

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss sql_variant and SQL Server 2005 Integration Services (DTS) in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Greg
 
Posts: n/a

Default sql_variant and SQL Server 2005 Integration Services (DTS) - 07-07-2005 , 03:02 PM






I need to use a column with a sql_variant data type from a SQL Server 2000
table in a Data Flow Task without using the default conversion to DT_WSTR. I
would be willing to copy the sql_variant column contents to another column
with the appropriate data type, if possible.
Thanks,
Greg



Reply With Quote
  #2  
Old   
Jamie Thomson
 
Posts: n/a

Default Re: sql_variant and SQL Server 2005 Integration Services (DTS) - 07-12-2005 , 05:26 PM






Greg,
I just knocked together a package that did this and didn't find any
problems. I successfully converted the values from the sql_variant column
from unicode into a column of type DT_STR. It worked fine. The conversion
was done using a derived column component.

Of course, it depends on the values that you have as to whether it will work
for you. I don't envisage too many problems though.

Regards
Jamie Thomson
An SSIS blog - http://blogs.conchango.com/jamiethom...tegory/71.aspx


"Greg" <Greg (AT) discussions (DOT) microsoft.com> wrote

Quote:
I need to use a column with a sql_variant data type from a SQL Server 2000
table in a Data Flow Task without using the default conversion to DT_WSTR.
I
would be willing to copy the sql_variant column contents to another column
with the appropriate data type, if possible.
Thanks,
Greg





Reply With Quote
  #3  
Old   
Greg
 
Posts: n/a

Default Re: sql_variant and SQL Server 2005 Integration Services (DTS) - 07-12-2005 , 06:20 PM



I always get a warning message "The output"OLE DB Source Output" (10)
references an external data type that cannot be mapped to a Data Flow task
data type. The Data Flow task data type DT_WSTR will be used instead." You
didn't get this I imagine. How?

I have columns with a float data type that won't be properly converted to
string without casting them using style number 2 (truncates).

"Jamie Thomson" wrote:

Quote:
Greg,
I just knocked together a package that did this and didn't find any
problems. I successfully converted the values from the sql_variant column
from unicode into a column of type DT_STR. It worked fine. The conversion
was done using a derived column component.

Of course, it depends on the values that you have as to whether it will work
for you. I don't envisage too many problems though.

Regards
Jamie Thomson
An SSIS blog - http://blogs.conchango.com/jamiethom...tegory/71.aspx


"Greg" <Greg (AT) discussions (DOT) microsoft.com> wrote in message
newsF135B2D-D2C6-4E31-85AB-260048785024 (AT) microsoft (DOT) com...
I need to use a column with a sql_variant data type from a SQL Server 2000
table in a Data Flow Task without using the default conversion to DT_WSTR.
I
would be willing to copy the sql_variant column contents to another column
with the appropriate data type, if possible.
Thanks,
Greg






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.