Hi,

I'd like to fetch a selection of records out of a big n:m-relation.
It's something like:
customers (c_id, c_name, c_address, ....);
projects (p_id, p_name, c_start,  ....);
cp_relation (c_id, p_id, status_id, ....);

I use Access2000 as client.
The user selects an project_id by a combobox in the customer form. Then the form should limit it's scope to only those customers that relate to this project. The form's recordsource should be a SELECT that fetches just the relevant customer-ids and collects the individual customer's data when his id is current record.


I'd rather not let Access do the SELECT locally because then the whole cp_relation had to be transferred.
A postgres-view would be as far as I know static. That is I'd need a seperate view for every project. That's possible but seems a bit unelegant.
It would be:
view1 : SELECT c_id FROM cp_relation WHERE p_id = 1;
view2 : SELECT c_id FROM cp_relation WHERE p_id = 2;
view3 : SELECT c_id FROM cp_relation WHERE p_id = 3;
...


That screams for a parameter.
Is this possible ?


Thanks for reading so far Andreas

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
     subscribe-nomail command to [EMAIL PROTECTED] so that your
     message can get through to the mailing list cleanly

Reply via email to