I'm avoiding formulas using variables at this contract because they destroy pass through SQL generation (not applicable here, but I try to be consistent for maintenance reasons), and unfortunately, this contract is using Views, not SP's. People seem to prefer formulas with variables aroun here, I think it makes them feel like *real* coders or sumpin...
Simple example of destroying pass through:
Formula Named SomeID
numbervar CNT_ID;
CNT_ID := 1;
CNT_ID
If you use this formula in a record selection criteria, it won't pass it through
If you just place 1, or use some math or Crystal functions, it will pass it through. Picky lil Crystal SQL generator...
ro: I like the phrase *competitive altruism* and I suppose either formula can work. The quality check and performance gain probably aren't factors here. I used to own a database outsourcing firm, and this was SOP for addresses (we cleaned the table if we were paid, but if we were just building a tape to hang on a print station, we'd just format accordingly).
*andrew*: Join is great. *tidy* is indeed a good word for it, that's the way to go, though the example seems to require a comma cleanup if address1 is empty. Join is a great way to display parameter choices from the array, thanks! <applause inserted here>
ngolem: Looks pretty good, but I still dislike not testing for blank in the address1 field, and why use a length check when you already have the field trimmed and can just check for = "", I suggest it just degrades your performance...and...you're the second person who I've read mentioning the weather up there, a recently repatriated Canadian friend wrote today:
The roads are too long, and covered with snow, why did I move back to Canada again?
Sounds a bit nipply up there, time to arrange for a training class in California, methinks.
-k
kai@informeddatadecisions.com