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

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!uknet!root44!praxis!dowen
  2. From: dowen@praxis.co.uk (David Owen)
  3. Newsgroups: comp.databases.sybase
  4. Subject: Select * (Was: Re: multiple EXISTS ...)
  5. Message-ID: <DOWEN.92Nov18120919@russell.praxis.co.uk>
  6. Date: 18 Nov 92 12:09:19 GMT
  7. References: <1992Nov14.174847.29576@lamont.ldgo.columbia.edu>
  8.     <1992Nov15.144258.18635@panix.com>
  9.     <1992Nov15.225853.2269@lamont.ldgo.columbia.edu>
  10.     <1e8fj7INN1sg@gazette.bcm.tmc.edu>
  11.     <1992Nov16.184540.11698@lamont.ldgo.columbia.edu>
  12. Sender: dowen@praxis.co.uk (David Owen)
  13. Organization: Praxis Systems, Bath, UK
  14. Lines: 28
  15. In-Reply-To: msolda@lamont.ldgo.columbia.edu's message of 16 Nov 92 18: 45:40 GMT
  16.  
  17. >>>>> Regarding Re: multiple EXISTS subqueries under Sybase 4.8; msolda@lamont.ldgo.columbia.edu (M Solda) said:
  18.  
  19. [stuff deleted ...]
  20.  
  21. M> select last_name, first_name, salary, title
  22. M> from employee_id i1, salary_history s1, employee_status e1
  23. M> where not exists (select *
  24.                      ^^^^^^^^^
  25. M>                   from employee_status
  26. M>                   where status_begin < '1/1/0'
  27.  
  28. [large query deleted ...]
  29.  
  30. If you were using Oracle this would be replaced by 
  31.  
  32.         "... (select null ...) ..."  
  33.  
  34. I was told on a Sybase course that this syntax is Oracle specific and the best
  35. Sybase solution is 'select "x" from ..." for sub-queries.  Is this correct?
  36.  
  37. dowen
  38. --
  39. David Owen, Praxis plc, 20 Manvers Street, Bath BA1 1PX UK.
  40. Tel:    +44-225-444700.   Email:   dowen@praxis.co.uk
  41.  
  42.  "You needn't be well to be wealthy,
  43.   but you've got to be whole to be holy"
  44.                               -- Greg Lake
  45.