Re: Dumb Character Column

From: hpuxrac <>
Date: Tue, 26 Jan 2010 18:16:14 -0800 (PST)
Message-ID: <>

On Jan 26, 5:50 pm, The Magnet <> wrote:


> Hi,
> Ok, whomever wrote this dumbass application should be put on trial.
> Anyhow, we have a column in our table which is defined as VARCHAR2,
> but contains both numbers AND character data.
> Problem is that we need to do some < & > in a query on the numeric
> content.  But, because of the character data we get an invalid
> number.  If we quote the numbers it does a character compare, not a
> numeric compare.
> Still looking on the internet for an answer, but anyone here have any
> ideas?
> Thanks!

You could do an order by to sort the character field generate some rownums and then select out just the rownums to create a number for that field.

Won't scale very well if you have many rows in the table ... Received on Tue Jan 26 2010 - 20:16:14 CST

Original text of this message