Re: fractions
Posted in 2003
> THIS IS A MESSAGE IN 'MIME' FORMAT. Your mail reader does not support MIME. > Some parts of this will be readable as plain text. > To see the rest, you will need to upgrade your mail reader. --PART.BOUNDARY.2960.4671.p057.1056378754.6737 Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-ID: <2960_4671_1056378754_38@inet3-p057> FYI, just ran my test program on RH8/686 Linux clock resolution is 0.000005 sec. FWIW. Art ----- Original Message ----- To: informix-list@iiug.org At: 6/23 8:54 If you set the ONCONFIG parameter USEOSTIME to 1 CURRENT will return the full system resolution of fractional time. This is system dependent and may or may not be tunable in the kernel again depending on your OS. For example the resolution of the system clock on AIX seems to be about 0.000016 seconds, on DG/UX 0.0078 second, and on Solaris 0.000073 second as reported in a tight loop calling gettimeofday(). Also note even with USEOSTIME set within a single query or a single call to a stored procedure CURRENT will return the same time regardless of how many times it is called. So your output might change to: 2003-06-20 11:34:35.00031 2003-06-20 11:34:35.00031 2003-06-20 11:34:35.00031 2003-06-20 11:34:35.00031 But you will never receive different values for each row. This behavior is required by the SQL standard and implemented in IDS. Art S. Kagel ----- Original Message ----- From: Arnel Cueto <arnel.cueto@dhl.com> At: 6/23 4:47 > Gurus, > > I have some inquiries regarding the expression 'CURRENT' used in SQL. > Refering to the statement below : > > select current year to fraction(5) from [table_name] > > would produce a result: > > 2003-06-20 11:34:35.00000 > 2003-06-20 11:34:35.00000 > 2003-06-20 11:34:35.00000 > 2003-06-20 11:34:35.00000 > > Questions: > 1. Notice that the fraction(5) portion on the result set produces > '00000' value. Is there something that I need to set to produce this > segment? > 2. have try to used the 'EXTEND' function but to no avail. Are there > any other function that might help? I'm using Informix7.31 in a HPUX11.0 > > environment. > > thanks in advance. > > Regards, > Arnel --PART.BOUNDARY.2960.4671.p057.1056378754.6737 Content-Type: application/octet-stream; name="12919675.htm" Content-Transfer-Encoding: 7bit Content-Disposition: ATTACHMENT; filename="12919675.htm" Content-ID: <2960_4671_1056378754_39@inet3-p057> <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <tt>Gurus,</tt><tt></tt> <p><tt>I have some inquiries regarding the expression 'CURRENT' used in SQL.</tt> <br><tt>Refering to the statement below :</tt><tt></tt> <p><tt>select current year to fraction(5) from [table_name]</tt><tt></tt> <p><tt>would produce a result:</tt><tt></tt> <p><tt>2003-06-20 11:34:35.00000</tt> <br><tt>2003-06-20 11:34:35.00000</tt> <br><tt>2003-06-20 11:34:35.00000</tt> <br><tt>2003-06-20 11:34:35.00000</tt><tt></tt> <p><tt>Questions:</tt> <br><tt>1. Notice that the fraction(5) portion on the result set produces</tt> <br><tt>'00000' value. Is there something that I need to set to produce this</tt> <br><tt>segment?</tt> <br><tt>2. have try to used the 'EXTEND' function but to no avail. Are there</tt> <br><tt>any other function that might help? I'm using Informix7.31 in a HPUX11.0</tt> <br><tt>environment.</tt><tt></tt> <p><tt>thanks in advance.</tt><tt></tt> <p><tt>Regards,</tt> <br><tt>Arnel</tt></html> --PART.BOUNDARY.2960.4671.p057.1056378754.6737-- sending to informix-list