>I have a things table and a documents table, related many to many with a
>common child table called thingdocs. What is the best view to use for a
>report listing the documents for each thing, or the things for each
>document? I haven't tried using parameterized views with a report before.
>I wasn't sure if it was best to make one big view containing everything, or
>two separate views, with one parameterized, or what. Thank you.
select * from docs ;
where doc in (select dist doc from thingdocs where thing=mything) ;
into curs temp order by doc
or
select * from things ;
where thing in (select dist thing from thingdocs where doc=mydoc) ;
into curs temp order by thing
....depending on which one you want. You need only two parameters to the
routine doing this select - one to choose things on doc or doc on
things, another to supply mydoc or mything.
Wild guess: you really have a file named things.dbf?