home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / oracle / 1464 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  1.6 KB

  1. Path: sparky!uunet!oracle!unrepliable!bounce
  2. Newsgroups: comp.databases.oracle
  3. From: kjou@us.oracle.com (Kathy Jou)
  4. Subject: Re: PL/SQL, V$ problem
  5. Message-ID: <1992Sep2.170535.25347@oracle.us.oracle.com>
  6. Keywords: workaround reserved
  7. Sender: Kathy Jou
  8. Nntp-Posting-Host: hqpyr1.us.oracle.com
  9. Organization: Oracle Corporation, Redwood Shores CA 94065
  10. References: <1992Sep1.155256.336@hhcs.gov.au>
  11. Date: Wed, 2 Sep 1992 17:05:35 GMT
  12. X-Disclaimer: This message was written by an unauthenticated user
  13.               at Oracle Corporation.  The opinions expressed are those
  14.               of the user and not necessarily those of Oracle.
  15. Lines: 28
  16.  
  17. In article <1992Sep1.155256.336@hhcs.gov.au> sharmp@hhcs.gov.au writes:
  18. [stuff deleted...]
  19. >    INSERT INTO dbu.drs_snapshot_v$lock
  20. >         SELECT d.db_started,
  21. >            d.db_closed,
  22. >            v.addr,
  23. >            v.pid,
  24. >            v.type,
  25. >            v.id1,
  26. >            v.id2,
  27. >            v.lmode,
  28. >            v.request
  29. >           FROM v$lock v, dbu.drs_driver d
  30. >fails because TYPE is a PL/SQL reserved word.  Sure, we could create the insert
  31. >statement as select * from, or rename the column, but is there a way to get
  32. >PL/SQL to accept a reserved word as a column name (how come ORACLE uses
  33. >reserved words anyway?! :^)).
  34.  
  35. Upper case the reserved words and put double quotes around them, i.e. use
  36. v."TYPE".  This is a rough workaround since the restriction is clearly 
  37. documented.  All *programming* languages have reserved words (can't declare a
  38. variable called if in C).  I guess we just have to live with it.
  39.  
  40.  
  41. -- Kathy Jou
  42. -- Oracle Corporation
  43. -- Disclaimer: not an official Oracle spokesperson...
  44.  
  45.