Return-Path: <root@fatcity.cts.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id gBNKvWl23333
 for <oracle-l@orafaq.net>; Mon, 23 Dec 2002 14:57:32 -0600
X-ClientAddr: 209.68.248.164
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id gBNKvVc23324
 for <oracle-l@orafaq.net>; Mon, 23 Dec 2002 14:57:31 -0600
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id JAA71688;
 Mon, 23 Dec 2002 09:39:02 -0800 (PST)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 00521505; Mon, 23 Dec 2002 09:04:23 -0800
Message-ID: <F001.00521505.20021223090423@fatcity.com>
Date: Mon, 23 Dec 2002 09:04:23 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Nicoll, Iain" <IAIN.D.NICOLL@saic.com>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Nicoll, Iain" <IAIN.D.NICOLL@saic.com>
Subject: RE: Right()
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain;	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

The equivalent will be substr in one of it's many forms

SUBSTR(char, m [, n])

Returns a portion of Char, beginning at character M, N characters long.

If M is positive, Oracle counts from the beginning of Char to find the first
character.
if M is negative, Oracle counts backwards from the end of Char.
If N is omitted, Oracle returns all characters to the end of Char.



-----Original Message-----
Sent: 23 December 2002 15:49
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@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@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@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: Nicoll, Iain
  INET: IAIN.D.NICOLL@saic.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@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).

