Kind of makes the original ALLTRIM(STR()) solution seem elegant <g>. Rick White Light Computing, Inc.
www.whitelightcomputing.com www.swfox.net www.rickschummer.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MB Software Solutions Sent: Monday, December 24, 2007 11:16 AM To: [EMAIL PROTECTED] Subject: Need tip on TRANSFORM I've got a cursor that has numeric and character fields. The program inserts values into the numeric field, and the character fields DEFAULT value settings transform the numbers into their character equivalents. I had been using something like this: CREATE CURSOR curReport(nValue n(10,2), cValue c(10) DEFAULT ALLTRIM(STR(nValue,10,liDecimals))) ...where liDecimals is a value set at run time depending on the amount of decimal places I need for that record insert. In my testing I know that TRANSFORM would be great like this: TRANSFORM(nValue,'999,999.99') ...but sometimes I don't want the character representation to have the same number of decimal positions. My plan B is to create some rigged UDF whereby I pass the value and the number of decimals places I want and it parses/builds it for me, but that seems kludgey. Is there a way to get the transform to behave variably like I had in my initial DEFAULT value with ALLTRIM(STR(..)) without a UDF ?? Thanks, and Merry Christmas/Happy Holidays! --Michael -- Michael J. Babcock, MCP MB Software Solutions, LLC http://mbsoftwaresolutions.com http://fabmate.com "Work smarter, not harder, with MBSS custom software solutions!" [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

