Re: Sort in Query

From: <>
Date: Thu, 03 Jan 2008 20:15:30 +0100
Message-ID: <>

On Thu, 03 Jan 2008 16:16:26 +0100, Bram MariŽn <> wrote:

>I understand that logic, but why is there a difference in the sort (both
>ASCII I assume) in the resultset of a query without a whereclause and the
>resultset of a query with a whereclause (INV_NR>'somevalue')
>If you do :
>I would assume Oracle returns me invoice_no 3307/0003, and not 33070001,
>because / < 0 ?

You are comparing *strings* not numbers. As there is varchar2 column in the left hand side, and a string in the right hand side, there will be no implicit conversion. Also changes are your explain plan use the index, and the order by is suppressed.

You need to fix the mess, or learn to live with it.

Sybrand Bakker
Senior Oracle DBA
Received on Thu Jan 03 2008 - 13:15:30 CST

Original text of this message