Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-00911: invalid character
Dave,
Tried without success.
SQL> l
1 SELECT cust_last_name,
2 case credit_limit when 100 then `low`
3 when 5000 then `high`
4 else `Medium` AS casecr
5* from customers
SQL> /
case credit_limit when 100 then `low`
*
SQL> Dave Hau wrote:
> "sdg" <nospan_at_noway.org> wrote in message
> news:3E98B5A9.2616C1B4_at_noway.org...
> > Below came from 92R SQL Plus Reference. Can someone give me a hand as to
> > why I am getting
> > the ORA-00911 error. I have tried to track down without success.
> >
> >
> > SQL> l
> > 1 SELECT cust_last_name,
> > 2 CASE credit_limit WHEN 100 THEN 'Low'
> > 3 WHEN 5000 THEN 'High'
> > 4 ELSE 'Medium' END
> > 5* FROM customers
> > SQL>
>
> Try:
>
> ...
> ELSE 'Medium' END AS casecr
> FROM customers
>
> Cheers,
> Dave
>
> >
> >
> > SQL> /
> > CASE credit_limit WHEN 100 THEN 'Low'
> > *
> > ERROR at line 2:
> > ORA-00911: invalid character
> >
> >
> > SQL> show user
> > USER is "OE"
> > SQL> desc customers
> > Name Null? Type
> > ----------------------------------------- --------
> > ---------------------------
> > CUSTOMER_ID NOT NULL NUMBER(6)
> > CUST_FIRST_NAME NOT NULL VARCHAR2(20)
> > CUST_LAST_NAME NOT NULL VARCHAR2(20)
> > CUST_ADDRESS CUST_ADDRESS_TYP
> > PHONE_NUMBERS PHONE_LIST_TYP
> > NLS_LANGUAGE VARCHAR2(3)
> > NLS_TERRITORY VARCHAR2(30)
> > CREDIT_LIMIT NUMBER(9,2)
> > CUST_EMAIL VARCHAR2(30)
> > ACCOUNT_MGR_ID NUMBER(6)
> > CUST_GEO_LOCATION MDSYS.SDO_GEOMETRY
> >
> >
> >
> >
> > ORA-00911 invalid character
> > Cause: Special characters are valid only in certain places. If special
> > characters
> > other than $, _, and # are used in a name and the name is not enclosed
> > in double
> > quotation marks ("), this message will be issued. One exception to this
> > rule is
> > for database names; in this case, double quotes are stripped out and
> > ignored.
> > Action: Remove the invalid character from the statement or enclose the
> > object
> > name in double quotation marks.
> >
> >
> >
Received on Sun Apr 13 2003 - 08:00:57 CDT