Re: Anyone have a function to compute the size of a column?
Posted in 1995
Jack Parker (jparker@boi.hp.com) wrote: : Oh really? I had never thought to look. I have now done so - what a lot : of code! (230 lines of code to do what I did in 15 - of course theirs probably : works). Since I was having a problem with the handling of DAY(3) I've : gone ahead and plaguerized the cnvrt_dt function for dbdiff2. I'm not : terribly excited about how they handled some of the things therein, but then : I haven't looked TOO closely yet either. Well see.... The example doesn't handle an INTERVAL of DAY(3) TO DAY either. My previous comment about 230 lines of code vs 15 is not exactly nice considering that the example is a heck of a lot better commented. Once you discount those the actual number of code lines is more like 109 vs 9. They went to Hex to do the work vs using Mod, and have all of the resultant values (YEAR, MONTH...) in the code itself vs using an array to just yank the appropriate value out. Interesting, always nice to see how others do stuff. cheers j. _____________________________________________________________________________ Jack Parker - Hewlett Packard, BSMC Boise, Idaho, USA jparker@hpbs3645.boi.hp.com _____________________________________________________________________________ "A thing is bigger for being shared" - Gaelic _____________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. _____________________________________________________________________________