home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / database / 8031 < prev    next >
Encoding:
Internet Message Format  |  1992-11-22  |  1.7 KB

  1. Path: sparky!uunet!decwrl!waikato.ac.nz!comp.vuw.ac.nz!ferrari.datamark.co.nz!david
  2. Newsgroups: comp.databases
  3. Subject: Bug with FOXPRO 2 SQL ???
  4. Message-ID: <1992Nov23.013506.21624@datamark.co.nz>
  5. From: david@datamark.co.nz (David Rowland)
  6. Date: Mon, 23 Nov 1992 01:35:06 GMT
  7. Organization: Datamark International Ltd.
  8. Lines: 51
  9.  
  10. Is it me or is there a bug with the FOXPRO 2 SQL language.
  11.  
  12. The bug is as follows:
  13.  
  14. If I had three tables
  15.  
  16. 1:   KEYA   KEYB   2:  KEYA    3:  KEYB
  17.  
  18.      AAAA   1111       AAAA        1111
  19.      BBBB   2222       BBBB        2222
  20.      CCCC   3333       CCCC        3333
  21.  
  22. and I access them through the following statement
  23.  
  24. select *
  25. from   table1, table2, table3
  26. where  table1.keya = table2.keya
  27.   and  table1.keyb = table3.keyb
  28.  
  29. I get the following
  30.  
  31. keya   keyb   table2.keya   table3.keyb
  32. AAAA   1111      AAAA          1111
  33. AAAA   1111      AAAA          2222
  34. AAAA   1111      AAAA          3333
  35. AAAA   1111      BBBB          1111
  36. AAAA   1111      BBBB          2222
  37. AAAA   1111      BBBB          3333
  38. ...
  39.  
  40. CCCC   3333      CCCC          1111
  41. CCCC   3333      CCCC          2222
  42. CCCC   3333      CCCC          3333
  43.  
  44. where I think I should have got 
  45.  
  46. keya   keyb   table2.keya   table3.keyb
  47. AAAA   1111      AAAA          1111
  48. BBBB   2222      BBBB          2222
  49. CCCC   3333      CCCC          3333
  50.  
  51.  
  52. Is this a bug and has it been fixed or should I be using the SET SKIP
  53. TO commands and not bother with SQL for this type of relation.
  54.  
  55. Thanx.
  56. -- 
  57. | David Rowland       | The British are using New Zealanders.  They must |
  58. | Datamark Intl Ltd   | really mean business !                           |
  59. | Wellington          |      -  General Rommel During Northern African   |
  60. | NEW ZEALAND         |         Campaign WWII.                           |
  61.