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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Peculiar results from a simple looking query.

Re: Peculiar results from a simple looking query.

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 24 Feb 2005 19:36:16 +0100
Message-ID: <gi7s11hdqq89sfvqqmbcuu8arva05cv1a9@4ax.com>


On 24 Feb 2005 09:45:47 -0800, netspam_at_shic.co.uk (Steve H) wrote:

>I've stumbled upon a peculiar result when querying Oracle which I have
>not experienced with other DBMS. Consider this example:
>
>create table atable(field varchar(20))
>insert into atable values ('This is a test')
>select field from atable where cast(field as varchar(2))='Th'
>
>Other DBMS return the single row:
>
>This is a test
>
>Oracle 9.2.10, however generates this result:
>
>Th
>
>Is this a widely known issue with Oracle? Can I change Oracle's
>behaviour by tweaking configuration or applying a patch? Is this a
>bug?

I would recommend writing ordinary SQL
such as
select field from atable where field like 'Th%' and of course read the manuals
and stop shouting 'BUG' at he first thing you don't understand

Oracle != Sqlserver.

--
Sybrand Bakker, Senior Oracle DBA
Received on Thu Feb 24 2005 - 12:36:16 CST

Original text of this message

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