Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Right()
SUBSTR(char,m[,n]) A subtring of char beginning at byte m, n bytes long (if
n omitted m to end of char)
i.e. If a = 'ABCDEFGHI'
substr(a,7,3) = 'GHI'
substr(a,7) = 'GHI'
-----Original Message-----
Sent: Monday, December 23, 2002 10:49 AM
To: Multiple recipients of list ORACLE-L
Please don't laugh. What is the equivalent of a Right() function in Oracle? I want to be able to sort a column numerically whose string contents takes the format "v1, v2, v3, v4". I was after something like:
ORDER BY Cast(Right(lt_tk_id, Length(lt_tk_id - 1)) as int)
but it's not playing nice. Order by Right(lt_tk_id, 1) gives the same error, so I assume that's where it's falling down. I've searched everywhere I can think of for "right function", Oracle online docs, Enterprise Manager docs, Google, but nothing seems to come close.
BTW, is it my imagination or do the docs leave a lot to be desired?
Thanks
--
Aidan Whitehall <aidanwhitehall_at_fairbanks.co.uk>
Macromedia ColdFusion Developer
Fairbanks Environmental Ltd +44 (0)1695 51775
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Dec 23 2002 - 10:54:43 CST
![]() |
![]() |