|
|
|
Re: Using Decimal Point in substr parameters [message #370751 is a reply to message #370746] |
Sun, 30 January 2000 07:54 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
Paul
Messages: 164 Registered: April 1999
|
Senior Member |
|
|
Kumar,
Well, if you think about it, SUBSTR requires integer values - it cannot possibly select the
2.3rd character or display 5.7 characters. So that leaves three possible behaviors if a decimal values are entered - round, truncate, or error off. Oracle chose to truncate them. It could be argued that rounding would be more 'logical', since this is the default behavior when you assign a decimal value to an integer, or that erroring off would actually be the 'correct' thing to do; but personally, I'm just happy that they chose to handle both parameters the same way.
Regards,
Paul
|
|
|