Home
Options

float in Oracle via IQToolkit

Hi, I am querying an Oracle table which has a FLOAT field, as shown in Oracle SQL Developer.

Through the IQToolkit and Linqpad, this field shows up as FLOAT(22). Switching to Linq, the field is mapped to Decimal.

When I query this field, for some reason, the sign of the number is lost. For example, 2522 was returned for -2522 using both SQL and Linq.

Any idea?

Comments

  • Options
    I want to supplement with an example:

    var query = from val in Objects select val;

    var result = query.ToList();

    Assert.True(query.Count(i => i.Field < 0) == result.Count(i => i.Field < 0)); // fails

  • Options
    I did some more research, and the evidence points to the version of the oracle driver that's causing this issue.

    this issue occurs in LinqPad 5, but not in 4. Would someone confirm the version of oracle driver Linqpad 4 uses. Thanks.
Sign In or Register to comment.