home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!oracle!unrepliable!bounce
- Newsgroups: comp.databases.oracle
- From: kjou@us.oracle.com (Kathy Jou)
- Subject: Re: PL/SQL, V$ problem
- Message-ID: <1992Sep2.170535.25347@oracle.us.oracle.com>
- Keywords: workaround reserved
- Sender: Kathy Jou
- Nntp-Posting-Host: hqpyr1.us.oracle.com
- Organization: Oracle Corporation, Redwood Shores CA 94065
- References: <1992Sep1.155256.336@hhcs.gov.au>
- Date: Wed, 2 Sep 1992 17:05:35 GMT
- X-Disclaimer: This message was written by an unauthenticated user
- at Oracle Corporation. The opinions expressed are those
- of the user and not necessarily those of Oracle.
- Lines: 28
-
- In article <1992Sep1.155256.336@hhcs.gov.au> sharmp@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...
-
-