Operand type clash: varbinary is incompatible with float error running

One Star

Operand type clash: varbinary is incompatible with float error running

When my job runs a good number of rows are both updated and inserted and then everything turns nasty with the error: Operand type clash: varbinary is incompatible with float.
Thing is I'm not sure where to begin to find where the problem is. The mapping looks reasonable good and I suspect it is the data I am getting back in the 1st place.
In general what is the best course of action or process of elimination do you use in this scenario?
Thanks, Dave.
One Star

Re: Operand type clash: varbinary is incompatible with float error running

Check your schemas. Looks like data type incompatibility though the compiler should have picked it up.
Moderator

Re: Operand type clash: varbinary is incompatible with float error running

Hi,
Varbinary will cast implicitly to varchar and int but not float.
See the graph here: http://msdn.microsoft.com/en-gb/library/ms187928.aspx
I suspect you are not storing a true database null in the varchar and int columns
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Operand type clash: varbinary is incompatible with float error running

The problem seemed to in the select statement even though the destination table accepts NULLs for the money columns it seemed to not like the in TOS. So a simple ISNULL() seemed to do the trick