Re: interval type
Posted in 1995
Bert Fonde writes: -> ->Is their a way to add differently defined interval types ? ->The manual says no but I am looking for a work around. -> ->I have variable in my table defined as interval hour to second, then ->in my 4gl report section I define calltotal as interval hour(5) to second. -> ->I would then like to do -> ->let calltotal = calltotal + rpt.callDuration -> ->However I get a runtime error of ->FORMS statement error number -1266. ->Intervals or Datetimes are incompatible for the operation. -> ->Can I convert some how ? The easiest way to convert interval types (as well as several other data types is to assign the interval value to a char, then assign the char to something defined as integer or some other numeric type. Using char as an intermediate location takes a lot of the type checking issues out of the equation. ->Now I can avoid all of this if I use the sum() function. However how ->can I format the output to show a greater precision in the hour qualifier ? I would do this before calling output to report and then go ahead and use your sum() and other aggregate functions which will work on the numeric value you pass in. Good luck! Regards, - Cathy -------------------------------------------------------------------------------- Cathy Kipp e-mail: ckipp@vth1.vth.colostate.edu Phone: (970) 491-1294 Colorado State University Veterinary Teaching Hospital Fax: (970) 491-1205