Dec 30, 2002 #1 IanKidd Programmer Jun 21, 2002 5 0 0 GB I have a field that is a decimal - how do I use a SELECT SQL statement to retrieve only the amount before/after the decimal point? i.e. value is 4.55 I want to select "4" and "55". Thanks.
I have a field that is a decimal - how do I use a SELECT SQL statement to retrieve only the amount before/after the decimal point? i.e. value is 4.55 I want to select "4" and "55". Thanks.
Dec 30, 2002 #2 olded Programmer Oct 27, 1998 1,065 0 0 US Ian: You can use one of the Informix built-in functions: Given: table o_table with a decimal column issqty: select TRUNC(issqty), ((issqty - TRUNC(issqty)) * 100) from o_table is close to what you want. There is a built-in MOD function, but I'm unable to get it to work. This should get you started. Regards, Ed Upvote 0 Downvote
Ian: You can use one of the Informix built-in functions: Given: table o_table with a decimal column issqty: select TRUNC(issqty), ((issqty - TRUNC(issqty)) * 100) from o_table is close to what you want. There is a built-in MOD function, but I'm unable to get it to work. This should get you started. Regards, Ed