Re: PL/SQL, V$ problem
In article <1992Sep1.155256.336_at_hhcs.gov.au> sharmp_at_hhcs.gov.au writes:
[stuff deleted...]
> INSERT INTO dbu.drs_snapshot_v$lock
> SELECT d.db_started,
> d.db_closed,
> v.addr,
> v.pid,
> v.type,
> v.id1,
> v.id2,
> v.lmode,
> v.request
> FROM v$lock v, dbu.drs_driver d
>fails because TYPE is a PL/SQL reserved word. Sure, we could create the insert
>statement as select * from, or rename the column, but is there a way to get
>PL/SQL to accept a reserved word as a column name (how come ORACLE uses
>reserved words anyway?! :^)).
Upper case the reserved words and put double quotes around them, i.e. use
v."TYPE". This is a rough workaround since the restriction is clearly
documented. All *programming* languages have reserved words (can't declare a
variable called if in C). I guess we just have to live with it.
- Kathy Jou
- Oracle Corporation
Disclaimer: not an official Oracle spokesperson...
Received on Wed Sep 02 1992 - 19:05:35 CEST
Original text of this message