Hi Jeff,

This is one of those "the trustee's are coming, the trustee's are coming"
situations.  In other words they needed this before yesterday.  We went
through the Benefactor to Colleague Advancement conversion in early
February.  This is the sort of request I was not looking forward to.
Fortunately, at least for the moment, this will only be used in a LIST
statement.  Hopefully this will handle the immediate problem.

Do you have an example or two of using triggers?  This sounds very useful.  

Thanks,

*-----------------------------------------------------------*
                          Jon Wells
Database Administrator                         Beloit College
Information Services & Resources           Beloit, Wisconsin
608-363-2290         [email protected]     608-363-2100 (fax)
*-----------------------------------------------------------*

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jeff Butera
Sent: Friday, April 24, 2009 9:01 AM
To: [email protected]
Subject: Re: [U2] I-descriptor subroutine / SELECT question

John wrote:
> Hi all,
>
> I was asked to create an I-descriptor friendly wrapper subroutine for a
> subroutine that has one input argument and 10 outputs.  Turns out this
> subroutine calls another subroutine that executes a select (against a
> different file).
>
> Active select -> LIST FILE-1 I-DESC -> I-DESC calls wrapper -> wrapper
> calls subroutine -> called subroutine tries to execute select against
> FILE-2.
>
> Is there any way to get around the active select so the query against
> FILE-2 works correctly?

John - the solution provided by David will work.  

However, I've got to say that I cringe whenver someone proposes using an 
I-decriptor that, in turn, is performing it's own SELECT under the hood.  
This is really poor from both a design and performance point of view - 
there's got to be a more methodical means to get the data you need.

For example, if your I-desc "XYZ.MONEY" is in the PERSON file and in turn 
performs a SELECT against the MONEY file and each has 1000 records, this:

SELECT PERSON WITH XYZ.MONEY > 1000.00

is going to execute 1,000,000 SELECTs to obtain it's results.

I do a lot with stored computed columns (ahem: I-desc), many of which are 
calculated in realtime using triggers.  Combined with indexing these stored 
values, queries take less than a second.



-- 
Jeff Butera, Ph.D.
Administrative Systems
Hampshire College
[email protected]
413-559-5556

"Dad, you're talking in grown-up and need to stop."
                 Catherine Butera
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to