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: How to use UPPER in a view ??? (Scalar Character Functions)

Re: How to use UPPER in a view ??? (Scalar Character Functions)

From: Vijay Vardhineni <vardhineni_at_worldnet.att.net>
Date: 1997/03/27
Message-ID: <01bc3a50$9b27c200$bf6993cf@default>#1/1

When using functions, you need to give aliases as show below. If you don't give alias for each values you select (in your select statement of a view), then your column names will be
UPPER(SLOT_NUM), UPPER(APPN_PB_NUM) ... . You cannot use parantheses as part of your column names. When ever you have expressions in your select statement, it is always advisable to use aliases.

CREATE VIEW stencil_p as
select UPPER (slot_num) SLOT_NUM,

	UPPER (apn_pb_num) APN_PB_NUM, 
	UPPER (apn_pba_num) APN_PBA_NUM, 
	UPPER (pb_alias_num) PB_ALIAS_NUM, 
	UPPER (pba_alias_num) PBA_ALIAS_NUM, 
	UPPER (dsr) DSR, 
	thickness, 
	UPPER (work_holder) WORK_HOLDER  
         from ssd.stencil
         where requirements ='P'
         and   status = 'R'         


-- 
Vijaya Kumar Vardhineni
Certified Oracle DBA, EDS
Plano, TX

Jens U. Veigel <jens_at_deutschware.com> wrote in article
<333952eb.93514997_at_news.aud.alcatel.com>...

> Hey SQL Gurus !
>
> The select statement works. When I try to do it in a view like below,
>
> CREATE VIEW stencil_p as
> select UPPER (slot_num), UPPER (apn_pb_num), UPPER
> (apn_pba_num), UPPER (pb_alias_num), UPPER (pba_alias_num), UPPER
> (dsr), thickness, UPPER (work_holder)
> from ssd.stencil
> where requirements ='P'
> and status = 'R'
>
> I get the following error:
>
> select UPPER (slot_num), UPPER (apn_pb_num) ........
> *
> ORA-00998: must name this expression with a column alias
>
> What does it mean ??? Thanks for taking the time to read it !!
>
> PS: Is there a way to implement a case restriction in a combobox ?
>
> Thanks
> Jens
> jens_at_deutschware.com
>
>
>
Received on Thu Mar 27 1997 - 00:00:00 CST

Original text of this message

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