Re: USING keyword
Posted in 1996
johnl@informix.com (Jonathan Leffler) wrote: >Put simply, you can't do it with USING. >>From: adel@q8petroleum.com.kw >>Date: Sun, 17 Mar 96 14:40:17 GMT >>X-Informix-List-Id: <news.22361> >> >>filed1 is decimal(10,6) >> filed1 may be up to 6 decimal or 2 decimal >> >>How would I prevent trailing zeroes from being printed >>(i.e. filed1=148.33 will be printed using ###.###### format as 148.330000) >>I must use ###.###### format because it may be up to 6 decimal.. If you are using 4GL then I think you can do it with USING, but you require an if statement and two USING clauses. Something like : LET temp_value = filed1 * 100 IF (temp_value * 10000) = (filed1 * 1000000) THEN PRINT filed1 USING "###.##" ELSE PRINT filed1 USING "###.######" END IF This is untested, but should give you the general idea. Cheers, Brent Jackson. brent@hypercom.co.nz Phone : 64-9-3603593 Fax : 64-9-3602840