I have 3 class each is a child of the previous, i.e.

A has Children B
B has Children C

I can't alter the class definitions as they are mapped to legacy globals,
but I want to access them and produce information
based on whats in A, B and C.

A, B and C hold data relevent to that level, and any of the data can be
changed without effecting data below.

Hence I have an query on A which tells me if anything has changed and
populate an array with the ID's

I then want to query B and see if anything has changed AND also return
anything which has changed on A (i.e. within the array of ID's).

And then so forth for C (and infact D and E).

I thought I could do the whole select with a select (x5), but the SQL got
massive and also didn't work hence I was splitting the process down to do a
query on each class.


    Hope that makes sense!, ANY help much appreciated.


"Enrico Parisi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Paul,
>
> I don't fully understand your question, what do you mean with "if its
> parent is in the array of objects" ?
>
> I cannot be precise but I think you can get advantage of Cach� implici
> joins like "Parent->ID" to get the ID of a referenced table.
>
> Maybe something like this?
>
> Select <whatever>
> from tab3
> where tab2->tab1->ID = ParentID
>
> In this case tab1 is parent, tab2 is child, tab3 is the SQL projected
array.
>
> If you post a sample tables structire it would be easier to help you.
>
> Ciao
>
> Enrico
>
> Paul wrote:
> > Hello All,
> >     Not being a SQL whiz I've got a "surely" simple problem, can someone
> > help?
> >
> >
> >     I have an array of objects and wish to select on a child table if
its
> > parent is in the array of objects, how do I write this in SQL?
> >
> > I want in logic terms this...
> >
> > SELECT * FROM Table WHERE Field1=:VAR1 OR $D(:ARRAY(Parent->ID))
> >
> > But ofcourse $D isn't an SQL function! I can't figure how to do it in
SQL..
> >
> >
> > Any help much appreciated.
> >
> >
> > Thankyou
> >
> >
>



Reply via email to