home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / database / 7997 < prev    next >
Encoding:
Text File  |  1992-11-20  |  1.9 KB  |  46 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!merlin!iris.resntl.bhp.com.au!orinoko!kevinb
  3. From: kevinb@resntl.bhp.com.au (Kevin Black)
  4. Subject: AREV MULTIVALUE Symbolics
  5. Message-ID: <By038z.4qA@resntl.bhp.com.au>
  6. Keywords: AREV MULTIVALUE SYMBOLIC
  7. Sender: news@resntl.bhp.com.au (Usenet news system)
  8. Reply-To: kevinb@resntl.bhp.com.au
  9. Organization: BHP Research - Newcastle Laboratories
  10. Date: Fri, 20 Nov 1992 05:58:11 GMT
  11. Lines: 33
  12.  
  13. I have a simple requirement that has wasted a deal of time.  An invoice
  14. file holds a multivalued field for invoice amount.  This field is defined 
  15. as MD2,$ ie.  formatted to $1,234.56.  What I want is a symbolic to round 
  16. up the decimal places as MD0,$.  Apart from lots of gacky equations the following
  17. has been tried with raw data of 123456~1234 (result denotes the amount and
  18. amount.rnd fields):
  19.  
  20.     formula                 result
  21.                         amount        amount.rnd
  22.  
  23.     @ans = {amount}                $1,234.56    $123,456
  24.                            $12.34      $1,234
  25.     @ans = {amount}/100            non-numeric when numeric expected
  26.  
  27.     @ans = {amount} /// 100            $1,234.56    $1,235
  28.                            $12.34        $0
  29.     
  30. T my mind this should be one of the trivial exercises.  After numerous other 
  31. and much more complicated attempts I'm back to square one.  Note that on the first 
  32. multivalue when it works it actually rounds correctly without any code.  The
  33. handling of multivalues in dictionary items is a constant cause for concern.
  34. Any help appreciated.                       
  35.  
  36. Thanks,
  37. Kevin
  38. -------------------------------------------------------------------/\/\---
  39. Kevin Black     Computer Systems Group Leader                     / / /\
  40.                 BHP Research - Newcastle Laboratories, Australia / / /  \
  41. Snail   :       P.O. Box 188, Wallsend 2287                     / / / /\ \
  42. Tel     :       +61 49 510434 Fax: +61 49 513740                \ \/ / / /
  43. Internet:       kevinb@resntl.bhp.com.au                         \  / / / 
  44. ------------------------------------------------------------------\/\/\/--
  45.  
  46.