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: Pedro Lopes <pedro.lopes_at_netvisao.pt>
Date: Fri, 25 Feb 2005 00:34:57 +0000
Message-ID: <newscache$xoyfci$yyb$1@newsfront4.netvisao.pt>


Hi,
Why don't you stop hunting bugs and
focus on the resolution of the business problems the simplest way possible ?

Every piece of software have bugs. Live with it ! And if this is really a problem for you (if it's stopping you from doing your work) open a TAR on metalink.

:)

pedro

Mark C. Stock wrote:
> "Turkbear" <john.g_at_dot.spamfree.com> wrote in message
> news:1109275195.7199aaac62c59c7f38ddabcf5312bb40_at_teranews...
>

>>ak_tiredofspam_at_yahoo.com wrote:
>>
>>
>>>Problem reproduced on 9.2.0.1.0
>>>Steve, you have build a very good case
>>
>>
>>Cast CONVERTS the given field ( on the fly) to the type specified, then 
>>queries it, so it will only have 2 chars in its
>>converted form.
>>
>>The docs are a nice thing..try them ..
>>
>>

>
>
> this looks odd (using 10.1.0.2.0)
>
> 1 select ename, cast(ename as varchar2(2)), lower(ename)
> 2* from emp
> SQL> /
>
> ENAME CA LOWER(ENAM
> ---------- -- ----------
> sm sm sm
> AL AL al
> WA WA wa
> ...
>
>
> docs do say:
>
> Purpose
> CAST converts one built-in datatype or collection-typed value into another
> built-in
> datatype or collection-typed value.
>
> however, docs also say:
>
> Purpose
> TO_CHAR (datetime) converts a datetime or interval value of DATE, TIMESTAMP,
> TIMESTAMP WITH TIME ZONE, or TIMESTAMP WITH LOCAL TIME ZONE datatype to
> a value of VARCHAR2 datatype in the format specified by the date format fmt.
> If
> you omit fmt, then date is converted to a VARCHAR2 value as follows:
>
> and I've never seen a TO_CHAR in the select list applied globally to the
> query... multiple expressions on the same column have always been
> independently evaluated
>
> so, although maybe substr is the preferred (traditional) way, is say, if it
> parses, it should give correct results
>
> BUG!
>
> ++ mcs
>
>
Received on Thu Feb 24 2005 - 18:34:57 CST

Original text of this message

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