Timeline for Force number precision in a view with Union
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 25, 2012 at 21:44 | vote | accept | kevinskio | ||
Nov 23, 2012 at 18:55 | answer | added | a1ex07 | timeline score: 2 | |
Nov 23, 2012 at 16:10 | history | edited | kevinskio | CC BY-SA 3.0 |
added 421 characters in body
|
Nov 23, 2012 at 15:00 | comment | added | Philᵀᴹ |
Maybe you're confused too. To cast as a floating point you need a precision and scale, so you'll need NUMBER(p,s) not just NUMBER(p) (which is equivalent to NUMBER(p,0) ).
|
|
Nov 23, 2012 at 14:57 | comment | added | Philᵀᴹ |
Also, I get NUMBER , NUMBER(1) , NUMBER(38) for the datatypes when trying your UNION test view on 11.2.0.2.0 64-bit Linux.
|
|
Nov 23, 2012 at 14:43 | comment | added | Philᵀᴹ | Yes, but I'm looking at the bigger picture. EF is casting to an Int64 - What data type do you actually want it to cast to? | |
Nov 23, 2012 at 14:36 | comment | added | kevinskio | Sorry Phil, the desired result is NUMBER(1) | |
Nov 23, 2012 at 14:34 | comment | added | Philᵀᴹ | Is it a double you're trying to get EF to cast to? | |
Nov 23, 2012 at 14:31 | history | edited | kevinskio | CC BY-SA 3.0 |
added 182 characters in body
|
Nov 23, 2012 at 14:27 | comment | added | Philᵀᴹ |
So, you're trying to get Entity Framework to cast to a Double? Have you seen the table on this page? devart.com/dotconnect/oracle/docs/DatatypeMapping.html The NUMBER() has to have a scale for Entity Framework to cast appropriately.
|
|
Nov 23, 2012 at 14:13 | history | asked | kevinskio | CC BY-SA 3.0 |