home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / 6330 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  1.8 KB

  1. Xref: sparky comp.databases:6330 comp.databases.theory:393 comp.databases.oracle:1378
  2. Newsgroups: comp.databases,comp.databases.theory,comp.databases.oracle
  3. Path: sparky!uunet!decwrl!deccrl!news.crl.dec.com!rdg.dec.com!uvo.dec.com!tplab.enet.dec.com!sobczak
  4. From: sobczak@tplab.enet.dec.com (Piotr Sobczak)
  5. Subject: Re: Is this a bug or a limitation of the SQL language
  6. Message-ID: <1992Aug26.090643.1318@decuk.uvo.dec.com>
  7. Lines: 33
  8. Sender: usenet@decuk.uvo.dec.com (News Account)
  9. Reply-To: sobczak@tplab.enet.dec.com (Piotr Sobczak)
  10. Organization: Digital Equipment Corporation
  11. References:  <1992Aug23.074048.16681@prism.poly.edu>
  12. Date: Wed, 26 Aug 1992 09:06:43 GMT
  13.  
  14.  
  15. In article <1992Aug23.074048.16681@prism.poly.edu>, sjha@prism.poly.edu (Salil Kumar Jha) writes:
  16. |> Xref: uvo.dec.com comp.databases:19031 comp.databases.theory:378 comp.databases.oracle:1346
  17. |> Newsgroups: comp.databases,comp.databases.theory,comp.databases.oracle
  18. |> Path: uvo.dec.com!rdg.dec.com!news.crl.dec.com!deccrl!caen!destroyer!gatech!news.ans.net!cmcl2!prism.poly.edu!sjha
  19. |> From: sjha@prism.poly.edu (Salil Kumar Jha)
  20. |> Subject: Is this a bug or a limitation of the SQL language
  21. |> Message-ID: <1992Aug23.074048.16681@prism.poly.edu>
  22. |> Organization: Polytechnic University, New York
  23. |> Date: Sun, 23 Aug 92 07:40:48 GMT
  24. |> 
  25. |> I tried to do this query in Oracle and DB2 and both failed. I know its
  26. |> not allowed but why not?
  27. |> 
  28. |> Assume the use of the classic oracle emp table
  29. |> 
  30. |> select * from emp 
  31. |> where salary between
  32. |> (select salary from emp where ename = 'Larry')
  33. |> and
  34. |> (select salary from emp where ename = 'John')
  35. |> 
  36. |> Isnt this the best way of finding all people whose salaries lie between those
  37. |> of Larry and John (without knowing whose is larger)
  38. |> 
  39. |> sjha@prism.poly.edu
  40. |> 
  41. |> 
  42.  
  43. FWIW, I just tried the syntax above on Rdb/VMS and it worked.
  44.  
  45.  
  46. Piotr
  47.