home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / oracle / 1486 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.4 KB

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