trunc function
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
This is a multi-part message in MIME format. ------=_NextPart_000_0153_01BFECC5.5A85E4E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Friends: Do you know how can I truncate decimals on classic 4gl program, where = the value is in a working variable on memory, without programming. I = mean using the sql function trunc. Thanks and Best Regards Guillermo Gonz=E1lez Note: I-4GL 4.20 OnLine 5.10 HP-UX 10.20 ------=_NextPart_000_0153_01BFECC5.5A85E4E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV style=3D"FONT: 10pt arial">Friends:</DIV> <DIV style=3D"FONT: 10pt arial"> </DIV> <DIV><FONT face=3DArial size=3D2>Do you know how can I truncate decimals = on classic=20 4gl program, where the value is in a working variable on memory, without = programming. I mean using the sql function trunc.</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Thanks and Best Regards</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Guillermo Gonz=E1lez</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2><U>Note</U>:</FONT></DIV> <DIV><FONT face=3DArial size=3D2> <DIV><FONT face=3DArial size=3D2>I-4GL 4.20</FONT></DIV> <DIV><FONT face=3DArial size=3D2>OnLine 5.10</FONT></DIV> <DIV><FONT face=3DArial size=3D2>HP-UX 10.20</FONT></DIV></FONT></DIV> <DIV> </DIV></BODY></HTML> ------=_NextPart_000_0153_01BFECC5.5A85E4E0--
Hello, Guillermo, I believe I can help you, but in another way than using the 'trunc' function of SQL. If you want to truncate all the decimal digits, you can define a variable of type 'smallint' or 'integer. By example, we supose that his name is 'int_value', and the decimal variable is named 'dec_value'. Then you assign the value of 'dec_value' to 'int_value': let int_value = dec_value The result of this assignment is that the new variable only contains the integer part of the decimal value. Best regards, Josep Ariet Guillermo González wrote: > This is a multi-part message in MIME format. > > ------=_NextPart_000_0153_01BFECC5.5A85E4E0 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > Friends: > > Do you know how can I truncate decimals on classic 4gl program, where = > the value is in a working variable on memory, without programming. I = > mean using the sql function trunc. > > Thanks and Best Regards > Guillermo Gonz=E1lez > > Note: > I-4GL 4.20 > OnLine 5.10 > HP-UX 10.20 > > ------=_NextPart_000_0153_01BFECC5.5A85E4E0 > Content-Type: text/html; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META content=3D"text/html; charset=3Diso-8859-1" = > http-equiv=3DContent-Type> > <META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR> > <STYLE></STYLE> > </HEAD> > <BODY bgColor=3D#ffffff> > <DIV style=3D"FONT: 10pt arial">Friends:</DIV> > <DIV style=3D"FONT: 10pt arial"> </DIV> > <DIV><FONT face=3DArial size=3D2>Do you know how can I truncate decimals = > on classic=20 > 4gl program, where the value is in a working variable on memory, without = > > programming. I mean using the sql function trunc.</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=3DArial size=3D2>Thanks and Best Regards</FONT></DIV> > <DIV><FONT face=3DArial size=3D2>Guillermo Gonz=E1lez</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=3DArial size=3D2><U>Note</U>:</FONT></DIV> > <DIV><FONT face=3DArial size=3D2> > <DIV><FONT face=3DArial size=3D2>I-4GL 4.20</FONT></DIV> > <DIV><FONT face=3DArial size=3D2>OnLine 5.10</FONT></DIV> > <DIV><FONT face=3DArial size=3D2>HP-UX 10.20</FONT></DIV></FONT></DIV> > <DIV> </DIV></BODY></HTML> > > ------=_NextPart_000_0153_01BFECC5.5A85E4E0--
Related threads
- Conversion to differeent characters sets
- Problem in changing locale via dbexport/dbimport
- RE: openlink error "Unable to load locale categories"