Re: check writing
Posted in 1994
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
In article <30k3nk$7vf@emory.mathcs.emory.edu>, sacs250!randy@veritas.com writes: >I have a user who wants to write checks or at least vouchers from >data that is stored in an Informix database. We need to have the >ability to convert money amounts into their english words. For example, >$10.95 converts to Ten and 95/100 Dollars. We have two schools of >thought. One says to use one or two lookup tables to construct the >string. The other says to write all of this in code to avoid the >cost of the database accesses. I would appreciate any thoughts. >Is this a canned routine somewhere? Randall - I have a C routine that does exactly this. You pass it the decimal value and it returns the formatted English string. I also have the routine written totally in Informix-4GL, with no C. I would recommend invoking functions rather than storing strings in a table, because of faster execution time. Let me know if you want either/both, and I will dig them up and mail them to you. Regards, Mike Teachworth CodeGen Software, Inc (504) 456-0123 voice (504) 456-1260 fax mike@codegen.com