home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / ingres / 2207 < prev    next >
Encoding:
Text File  |  1993-01-09  |  2.6 KB  |  73 lines

  1. Newsgroups: comp.databases.ingres
  2. Path: sparky!uunet!think.com!cass.ma02.bull.com!catfish.az05.bull.com!elm!mmitchel
  3. From: mmitchel@elm.Berkeley.EDU (Michael Mitchel)
  4. Subject: Re: problem with "DESC" as column name in Windows4GL
  5. Message-ID: <1993Jan08.154254.24753@catfish.az05.bull.com>
  6. Sender: news@catfish.az05.bull.com (placeholder for future)
  7. Reply-To: mmitchel@elm.Berkeley.EDU (Michael Mitchel)
  8. Organization: Bull HN Information Systems Inc., Phoenix Product Division
  9. References:  <FRANKS.93Jan8155235@ntrc27.ntrc.ntu.ac.sg>
  10. Distribution: comp
  11. Date: Fri, 08 Jan 93 15:42:54 GMT
  12. Lines: 59
  13.  
  14. In article <FRANKS.93Jan8155235@ntrc27.ntrc.ntu.ac.sg>, franks@ntrc27.ntrc.ntu.ac.sg (Frank Siebenlist) writes:
  15. |> 
  16. |> If a column name of "DESC" is used,
  17. |> then it seems "difficult" to access that column within Windows4GL.
  18. |> 
  19. |> For example a script containing:
  20. |> 
  21. |>     select :my_field = desc
  22. |>     from my_table;
  23. |> 
  24. |> yields compilation errors like:
  25. |> 
  26. |> E_W40118 The symbol 'desc' is undefined.
  27. |> 
  28. |> E_PW0005 Can't create variable for desc.
  29. |>     A variable couldn't be declared for the ENTRYFIELD desc.  A subsequent
  30. |>     error should give more information about why it couldn't be created.
  31. |> 
  32. |> E_SY0010 Reserved word used as name.
  33. |>     A variable (or other kind of object) was given the name `desc' which is
  34. |>     a reserved word.  You can not use a reserved word to name an object.
  35. |> 
  36. |> This is too bad, but it becomes worse if:
  37. |> 
  38. |>         :my_field = my_table.desc
  39. |> 
  40. |> yields the same error.
  41. |> 
  42. |> As far as I know, DESC is not a reserved word for column names.
  43. |> Also, other ingres programs like isql have no problem with: 
  44. |>     select desc from my_table;
  45. |> 
  46. |> Is Windows4GL too restrictive? Is this a feature or bug?
  47. |> 
  48. |> Is there a workaround?
  49. |> 
  50. |> Please don't tell me to rename my column names!
  51. |> (They are predefined by other existing applications.)
  52. |> 
  53. |> Regards, Frank.
  54. |> 
  55. |> --
  56. |> ---------------------------------------------------
  57. |> Frank Siebenlist                 <franks@ntu.ac.sg>
  58. |> Senior Research Fellow
  59. |> GINTIC Institute of Manufacturing Technology (GIMT)
  60. |> Nanyang Technological University (NTU)
  61. |> Nanyang Avenue
  62. |> Singapore 2263
  63. |> Tel: (65) 799-1356               Fax: (65) 791-2927
  64. |> ---------------------------------------------------
  65.  
  66. The keyword DESC is short for DESCending which is used in the ORDER BY
  67. clause.  I would expect it to generate errors such as you have described
  68. above.  Better use another name if you can.  By the way, you can find a
  69. list of keywords in appendix A of the Ingres 6.4 SQL Reference Manual.
  70.  
  71. Mike Mitchell
  72. Bull HN, Phoenix
  73.