home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!decwrl!purdue!mentor.cc.purdue.edu!coghawks
- From: coghawks@mentor.cc.purdue.edu (john)
- Newsgroups: comp.databases.oracle
- Subject: Oracle Precompilers and Nulls
- Keywords: Precompiler Null
- Message-ID: <Bu0zGv.941@mentor.cc.purdue.edu>
- Date: 3 Sep 92 23:19:42 GMT
- Distribution: usa
- Organization: Purdue University
- Lines: 20
-
- I recently happened into a problem using Pro-C with embedded SQL with
- Nulls and comparison differences between = and IS (NOT) NULL.
- It was when I had built a cursor which selected into a host variable,
- which was then used as part of a selection criteria on the next
- SQL statement. What occured was that when using the where clause
- for ex. WHERE EMPD.DESCRIPT = :host_emp, if either value was null
- then this never would return true or if they both were null
- it still wouldn't be true. So either I had to have 2 versions and check
- explicitly if and when things were NULL before I use them in a WHERE
- clause, or set them to a default value. Which in oracle is syntactily
- supported, but not implemented when declaring a table. Another problem
- with setting things to a default value is then building indexes etc..
- those values are all grouped. I am new at this and am looking forward
- to any replies.
-
- Thank you
- John Hawkins.
-
- ======================================================
- I disclaim !! I disclaim!!
-