|
> From: jpcarr@tredegar.com > > CREATE VIEW clearview > As Select > Ordno, > CASE Status > When 'O' Then 'Open' > When 'C' Then 'Closed' > End > AS Status I'll put my piece in once, then get out of it. Unless you're prepared to go whole-hog and redeploy all of your business rules in SQL, I would caution against doing something like this. Why? Well, because it isn't very flexible. This particular example fares very poorly in a multi-lingual environment. You'd want to get the values from a message file or some other reference object, and HLL programs are better at that than SQL. As to advanced arithmetic operations, except for the more trivial issues like sum and average, such operations are more than likely going to require parameters from other files. And once the rules get too complex for a simple SQL statement, now you have to go back and reengineer your code. The more I see this sort of issue arise, the more I'm convinced that a new layer needs to be added to the traditional model. This layer separates the traditional database tier into a business attribute tier and a data deployment tier. But as I said, I just wanted to comment on this particular example. It would not work well for many packages, though it might be fine for a company that never intends to do any international business. Joe
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.