![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Roy> I don't have a copy of the spec, but according to "A guide to Roy> the SQL standard" conversions like this that would discard Roy> data are supposed to raise an exception. Just to clarify, my understanding is that in ANSI SQL it is valid to convert from the data type INTERVAL YEAR TO MONTH to the data type INTERVAL YEAR, but the conversion should raise an exception if the value is not an integral number of years... |
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Tom> In order to support the spec *exactly*, we would have to. Tom> For instance we cannot presently tell the difference between Tom> '13 months' and '1 year 1 month' ... they both end up stored Tom> as '13 months'. I can't say that I find this very important, Tom> but it does put limits on how exactly we can emulate the Tom> spec. Which is where my comment about EXTRACT comes in. They can both be stored as 13 months, but EXTRACT (MONTH FROM ...) should return 1 month or 13 months as appropriate. Surely this isn't a problem, you know the type of the interval? |
#4
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |