Six Stars

Problem with a table copy with Dynamic schema

Hello everybody !

 

I'm trying to simply copy a table from a MS SQL Server database to another, using the Dynamic column type. 

 

Source is a v11

Destination is a V12

 

Error message is "the implicit conversion from Varchar to Varbinary is not allowed" (sorry if the translation is not perfect)

Since I'm using the same Dynamic type on both sides, I don't see why the types would not match. And I  used this Dynamic type on plenty of other transfers without any problem. But maybe never from this source. Did any of you have the same problem ? To create the destination table manually with some column conversion is quite time consuming (loooots of columns), the Dynamic trick is great to avoid editing the transfer each time a column is modified. So it would be great to be able to use it. 

2 REPLIES
Eight Stars

Re: Problem with a table copy with Dynamic schema

Hello,

 

Try to use the convert function during select. Eg.

SELECT CONVERT(VARBINARY(25), '0x9473FBCCBC01AF', 1);

Where you change the second parameter with appropriate column name. Hope it helps.

 

Regards

Lojdr

Six Stars

Re: Problem with a table copy with Dynamic schema

hi Lojdr

 

Thank you for your answer ! 

 

But the thing is that i'm using the Dynamic column solution, to avoid specifying the columns each time (so i'm just adding one "Dynamic" type column, on both ends). It's great to avoid editing the job each time a table is edited. Otherwise I'm indeed converting the data for tables with more specific columnbs, and it's working well.