home *** CD-ROM | disk | FTP | other *** search
- 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
- From: hatzinger_m@bmwf1f.bmwf.gv.at
- Newsgroups: comp.databases.oracle
- Subject: Re: Use of nvl
- Message-ID: <1992Aug19.082708.34@bmwf1f.bmwf.gv.at>
- Date: 19 Aug 92 09:59:40 GMT
- References: <5885.2a8fddad@hayes.com>
- Organization: (Klaus-Michael Hatzinger), BMWF, Vienna
- Lines: 50
-
- In article <5885.2a8fddad@hayes.com>, alacy@hayes.com writes:
- > Hi
- >
- > We are in the process of evaluating a software package. We have been
- > looking at their code and have run across what appears to be some strange
- > code using the "nvl" function. I have included some of their WHERE
- > clauses which do this:
- >
- > WHERE cust_no = nvl(null,:c.cust_no) ;
- > WHERE FOB_CD = nvl(null,:C.FOB_CD) ;
- > WHERE FREIGHT_CD = nvl(null,:C.FREIGHT_CD) ;
- > WHERE SHIPVIA_CD = nvl(null,:C.SHIPVIA_CD) ;
- > WHERE cust_no = nvl(null,:C.billto_cd) ;
- > WHERE TERMS_CD = nvl(null,:C.TERMS_CD) ;
- > WHERE cust_no = nvl(null,:C.billto_cd) ;
- > WHERE HOLD_CD = nvl(null,:C.HOLD_CD) ;
- > WHERE status_code = nvl(null,:C.order_status) ;
- >
- > If I understand the "nvl" function then the following expression from the
- > first where clause
- >
- > nvl(null,:c.cust_no)
- >
- > means if null is equal to null then return the value of bind variable
- > ":c.cust_no" which happens to be a screen variable. This means the
- > expression will always return the value of ":c.cust_no". Is there any
- > performance reason to do this? I would think this would actually slow the
- > form down. But the forms which came with the package have this type of
- > expression in a lot of places.
- >
- > Thanks!
-
-
- I think there is no use for this type of expression. It's only to confuse and
- to slow down the form. Maybe the developer of this form used any special type
- of generator or konverter.
-
-
- --
-
- ================================================================================
- ^
- Federal Ministry of Science and Research B | M
- <-------------------------------------------------------------------------+---->
- Computer Center W | F
- |
- Klaus-Michael Hatzinger mail: hatzinger_m@bmwf1f.bmwf.gv.at |
- Bangkasse 1/209 phone: 0043-222-53120/5188 |
- 1014 Vienna, Austria fax: 0043-222-53120/5155 V
- ================================================================================
-