Re: USING keyword
Posted in 1996
Colin McGrath — — source: Informix-list mailing list archive (1991-1998)
adel@q8petroleum.com.kw wrote: > > 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.. > Place the number in a character field and clean it up, as follows: LET char_field1 = field1 using "##&.######" FOR idx = 10 to 5 STEP -1 IF char_field1[idx] != "0" THEN EXIT FOR ELSE LET char_field1[idx] = " " END IF END FOR -- Colin McGrath <Standard disclaimers apply> Internet: cmm@trac3000.ueci.com Voice: 215-422-4144 FAX: 215-422-1445