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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Select question

Re: Select question

From: Steve Smith <ssmith_at_ai.com>
Date: Mon, 17 Sep 2001 10:07:41 -0700
Message-ID: <F001.00390884.20010917095519@fatcity.com>

The "distinct" can't be in the middle of the expression. "Distinct" must be at the beginning..

Try

Select distinct 'Testing ' || (to_char(mydate, 'MON')) from mytable;

Steve

> Hi all,
>
>
> Why I can't do this ?
>
>
> Select 'Testing ' || distinct(to_char(mydate, 'MON')) from mytable;
>
> *
> ERROR at line 1
> ora-00936: missing expression
>
>
> it is work if I do
>
> Select distinct(to_char(mydate, 'mon')) || ' testing' from mytable;
>
> WHY ??
>
>
>
>
> Best Regards
>
> Sinardy
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Sinardy
> INET: sinardyxing_at_bcsis.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Steve Smith
  INET: ssmith_at_ai.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Sep 17 2001 - 12:07:41 CDT

Original text of this message

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