home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / database / oracle / 1314 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  2.8 KB

  1. Path: sparky!uunet!zephyr.ens.tek.com!uw-beaver!cornell!batcomputer!munnari.oz.au!mips!mips!swrinde!elroy.jpl.nasa.gov!ames!haven.umd.edu!darwin.sura.net!paladin.american.edu!news.univie.ac.at!bmwf1f.bmwf.gv.at!hatzinger_m
  2. From: hatzinger_m@bmwf1f.bmwf.gv.at
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: Use of nvl
  5. Message-ID: <1992Aug19.082708.34@bmwf1f.bmwf.gv.at>
  6. Date: 19 Aug 92 09:59:40 GMT
  7. References: <5885.2a8fddad@hayes.com>
  8. Organization: (Klaus-Michael Hatzinger), BMWF, Vienna
  9. Lines: 50
  10.  
  11. In article <5885.2a8fddad@hayes.com>, alacy@hayes.com writes:
  12. > Hi
  13. > We are in the process of evaluating a software package. We have been 
  14. > looking at their code and have run across what appears to be some strange 
  15. > code using the "nvl" function.  I have included some of their WHERE 
  16. > clauses which do this:
  17. >              WHERE cust_no = nvl(null,:c.cust_no) ;
  18. >              WHERE FOB_CD = nvl(null,:C.FOB_CD) ;
  19. >              WHERE FREIGHT_CD = nvl(null,:C.FREIGHT_CD) ;
  20. >              WHERE SHIPVIA_CD = nvl(null,:C.SHIPVIA_CD) ;
  21. >              WHERE cust_no = nvl(null,:C.billto_cd) ;
  22. >              WHERE TERMS_CD = nvl(null,:C.TERMS_CD) ;
  23. >              WHERE cust_no = nvl(null,:C.billto_cd) ;
  24. >              WHERE HOLD_CD = nvl(null,:C.HOLD_CD) ;
  25. >              WHERE status_code = nvl(null,:C.order_status) ;
  26. >              
  27. > If I understand the "nvl" function then the following expression from the 
  28. > first where clause
  29. >             nvl(null,:c.cust_no) 
  30. >             
  31. > means if null is equal to null then return the value of bind variable 
  32. > ":c.cust_no"  which happens to be a screen variable.  This means the 
  33. > expression will always return the value of ":c.cust_no".  Is there any 
  34. > performance reason to do this?  I would think this would actually slow the 
  35. > form down.  But the forms which came with the package have this type of 
  36. > expression in a lot of places.  
  37. > Thanks!
  38.  
  39.  
  40. I think there is no use for this type of expression. It's only to confuse and
  41. to slow down the form. Maybe the developer of this form used any special type 
  42. of generator or konverter.
  43.  
  44.  
  45. -- 
  46.  
  47. ================================================================================
  48.                                                                           ^
  49.  Federal Ministry of Science and Research                               B | M
  50. <-------------------------------------------------------------------------+---->
  51.  Computer Center                                                        W | F
  52.                                                                           |
  53.  Klaus-Michael Hatzinger            mail: hatzinger_m@bmwf1f.bmwf.gv.at   |
  54.  Bangkasse 1/209                   phone: 0043-222-53120/5188             |
  55.  1014 Vienna, Austria                fax: 0043-222-53120/5155             V
  56. ================================================================================
  57.