Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re:Right ()

Re:Right ()

From: <dgoulet_at_vicr.com>
Date: Mon, 23 Dec 2002 08:59:57 -0800
Message-ID: <F001.005214EA.20021223085957@fatcity.com>


Laugh at you? Never, well once in a while.

    As for your problem, first thing I'd like to know is the version of Oracle your using. 9i I know has added several functions that do not exist earlier. Since 8.1.7.4 in my latest instance the 'right' function does not exist, so I'd suggest using substr with possibly a to_number. Something like:

order by to_number(substr(lt_tk_id,length(lt_tk_id)-1))

Dick Goulet

____________________Reply Separator____________________
Author: "Aidan Whitehall" <AidanWhitehall_at_Fairbanks.co.uk>
Date:       12/23/2002 7:49 AM

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



This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Aidan Whitehall
  INET: AidanWhitehall_at_Fairbanks.co.uk
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).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author:
  INET: dgoulet_at_vicr.com

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:59:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US