|
You're right, in that case you could have bypassed the function. Your sql would have worked fine. However earlier I was doing some stuff which was a little more complex and posted it here for resolution. The onhand does make a good example though. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "Peter Dow" <pcdow@yahoo.com> To: <midrange-l@midrange.com> Sent by: cc: midrange-l-admin@mi Fax to: drange.com Subject: Re: Triggers versus UDF's 02/13/2002 12:44 PM Please respond to midrange-l Hi Rob, You're probably right, and I guess my only real problem with your example is that the calculation of ONHAND is so simple that couldn't you could simply create view rob/iimx as select iprod, (iopb + irct + iadj + iiss) as ONHAND from iim with the same ability to simply change the view if the calculation changed? Given that you can even use the CASE function to incorporate some logic in the calculation, it would have to be a pretty complex calculation before I'd want to replace the CREATE VIEW with creating a module, creating a service program, creating a function, and then creating a view. OTOH, thanks for showing the steps. I haven't run into a situation where I could use a function yet, and when I do I'll be search the archives for your example <grin>! Peter Dow Dow Software Services, Inc. 909 425-0194 voice 909 425-0196 fax
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.