Hi,
 You cann't use the distinct operater for multiple columns of a select list
as well as in the middle.

  U can do like this:

  SQL> SELECT DISTINCT ('Testing '||To_Char(my_date,'mon')) FROM mytable;

Nirmal,

> -----Original Message-----
> From: Sinardy [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, September 17, 2001 11:35 AM
> To:   Multiple recipients of list ORACLE-L
> Subject:      Select question
> 
> 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: [EMAIL PROTECTED]
> 
> 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: [EMAIL PROTECTED] (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: Nirmal Kumar  Muthu Kumaran
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to