Re: Re: PL/SQL, V$ problem
Date: Wed, 2 Sep 92 15:04:59 PDT
Message-Id: <9209022204.AA20471_at_hqpyr1.us.oracle.com>
I tried to post a correction, but our news reader died. Here's a follow-up. It's a bug, not a restriction, in your case. Feel free to post this if your news reader is more robust than ours.
Cheers,
_Kathy_
Kathy Jou (415) 506-2523 -*- 400 OP, #519 Application Porting, DG/88open Systems Minicomputer Products Division -------------------------------------------------------------------------------
Newsgroups: comp.databases.oracle
Subject: Re: PL/SQL, V$ problem Summary: Expires:
References: <1992Sep1.155256.336_at_hhcs.gov.au> <1992Sep2.170535.25347_at_oracle.us.oracle.com> Sender: Kathy Jou
Followup-To:
Distribution:
Organization: Oracle Corporation, Redwood Shores CA 94065 Keywords: bug
Oops, this is a case where a reserved word is not used in the wrong context as documented (as an identifier, for example). PL/SQL v1.0.34 and higher fixes this problem. Sorry about that!
- Kathy Jou
- Disclaimer: Oracle's glad that I don't speak on their behalf...
In article <1992Sep2.170535.25347_at_oracle.us.oracle.com> kjou_at_us.oracle.com (Kathy Jou) writes:
>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 Thu Sep 03 1992 - 00:04:59 CEST