var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Using a float variable in SQL statement problem
I am having problems getting a row returned when using a variable defined as a float in a SQL statement. This is SQL embedded in C.
I have variable defined as:
The column in the Oracle table I'm trying to get a hit on is defined as Number 18,2.
The SQL has a line in the where statement like:
Select Blah blah
From Blah blah
WHERE blah blah and
ORACLETABLE.Cost = :fTotalCharge;
Cost has a value of 100.25 stored and a printf of fTotalCharge returns 100.250000.
This one line in the where clause causes the row not to return. IF I hardcode it as ORACLETABLE.Cost = 100.25 or ORACLECOST.Cost = 100.250000 the row returns fine.
Does anyone know why using the variable is causing me problems? Thanks for any help.
I believe this is precision of c program or os.
If possible try ROUND(:fTotalCharge,2) in your code.