Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Peculiar results from a simple looking query.
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 DBAReceived on Thu Feb 24 2005 - 12:36:16 CST