SQL data mismatch

I am running two seperate SQL statements off of Oracle, and keep gettting an error message no matter how I try to format the field in question.  The field that actually comes from Oracle in my first SQL statement is a Binary field  (Col Size 2, Oridinal 10, type name is decimal).  In the second SQL, I use       TO_BINARY_FLOAT('0.','9D') as ID_FEE      as a placeholder but when I go to merge the two datasets I get a "  "<target>.ID_FEE and <source>.ID_FEE have conflicting properties: DataType property mismatch."    error message.   All I am trying to do is place a 0. in the ID_FEE field as a placeholder.   Any help would be appreciated. Thanks

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mark GeerlingsDatabase AdministratorCommented:
Maybe the problem happens because of null values in some records?  If that is true, you may need to use  "nvl" to substitute a "0" for the null.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
from the sql reference-

TO_BINARY_FLOAT returns a single-precision floating-point number.

    expr can be a character string or a numeric value of type NUMBER, BINARY_FLOAT, or BINARY_DOUBLE. If expr is BINARY_FLOAT, then the function returns expr.

if your first column is a DECIMAL, then it is really of type NUMBER  (decimal is just an alias, it's not really a  type in Oracle)

NUMBER and BINARY FLOAT are distinct types
lva6600311Author Commented:
I changed the SQL fields as follows which seems to work when they merge into a dataset later in the code..

First SQL -       NVL(R.ID_FEE,0)
Second SQL - TO_NUMBER('00','99')  AS ID_FEE

Could you please let me know if you think another way of doing it might be better?  Thank You both for the help.  You(sdstuber) have answered a couple for me, which is appreciated, as my skills are a little lacking as I get back into programming after a few years off.  Thanks

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.