Implicit conversions

AAliceaAAlicea Posts: 2
Here is the scenario. We have the same table in different databases. There is one column in database A that is an int. The same column in database B is a varchar. I want to move data from database A to database B. When I try to compare these tables, the data does not get scripted and transferred to database B. If the data is moving from an integer column to a varchar column, that is an implicit conversion, and should be able to be properly compared, scripted and transferred. Is this something that you can possibly look into???


  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello Andre,

    Thanks, it is something that we can look into. As far as I'm aware, Data Compare will currently only operate on different datatypes if they can be cast to the same .NET Framework datatype. For instance, you can compare a numeric to an int, you can compare a char to a varchar, but you cannot compare a varchar to an int.

    I think you may be able to set up an indexed view on these tables and compare through that, letting SQL Server do the conversion for you. I say think because I don't know if the update script world necessarily work in all circumstances. Something to think about, though, if this is causing a huge problem for you!
This discussion has been closed.