John,

Look at the DECODE statement.  You can use it in the ORDER BY clause.  I
would *never* insert a garbage value into a database column as you are
talking about.  How do you determine if it is truely garbage?  You know of
course, if you selected a "high values" value today, that next month that
value would be valid, so you would end up updating the column to something
else.

An order by using DECODE could look like:

ORDER BY DECODE(number_column,null,99999999999,number_column)

or

ORDER BY DECODE(char_column,null,'999999999999',char_column)

hope this helps

Tom Mercadante
Oracle Certified Professional


-----Original Message-----
Sent: Friday, September 20, 2002 5:18 AM
To: Multiple recipients of list ORACLE-L


Basically what I want to do is put a value in a VARCHAR2 column that will
ensure it appears as the last row when selected using an ORDER BY on the
column

John

> -----Original Message-----
> From: DENNIS WILLIAMS [SMTP:[EMAIL PROTECTED]]
> Sent: 19 September 2002 21:09
> To:   Multiple recipients of list ORACLE-L
> Subject:      RE: High values
> 
> John - Since nobody has replied to your question, I discussed it with a
> fellow COBOL programmer. I think that in COBOL you normally would use this
> in an iterative loop, as a comparison. In SQL itself, you rarely iterate,
> so
> you probably don't have that much need for a HIGH-VALUE. In PL/SQL you
> might
> be more likely to need it. Myself, I have used such a thing in the C
> language before, and there was usually a precompiler value that you could
> include. For Oracle, the maximum integer that can be represented is 38 9's
> times 10 to the 125th. power. Here is a web address that lists a lot of
> the
> Oracle limits as of 8.0.5.
> 
>  http://storacle.princeton.edu:9001/oracle8-doc/server.805/a58242/ch5.htm
> 
> Dennis Williams
> DBA
> Lifetouch, Inc.
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
> 
> 
> -----Original Message-----
> Sent: Thursday, September 19, 2002 12:21 PM
> To: Multiple recipients of list ORACLE-L
> 
> 
> Is there a Oracle equivalent to the Cobol HIGH-VALUES value?
> 
> John
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: John Dunn
>   INET: [EMAIL PROTECTED]
> 
> 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: [EMAIL PROTECTED] (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.com
> -- 
> Author: DENNIS WILLIAMS
>   INET: [EMAIL PROTECTED]
> 
> 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: [EMAIL PROTECTED] (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.com
-- 
Author: John Dunn
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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.com
-- 
Author: Mercadante, Thomas F
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to