A
Amit
Hi,
I have the following tables in my database:
1. tblOrg (OrgID*, OrgName)
2. tblProg (ProgID*, ProgName)
3. tblProgOrg (OrgID*, ProgID*)
since there is a many-to-many relationship between Org and Prog.
I need to get a list of OrgIDs for each ProgID where the OrgID is exclusive
to that ProgID. I will be entering the ProgID as parameter.
e.g.
OrgID ProgID
--------------
1, A
1, B
1, C
2, A
3, A
3, B
4, B
4, C
5, A
6, C
So, I need the following query result for ProgID = A: (2, 5) since those are
the two OrgIDs for A that do not occur with any other ProgID.
For ProgID = B: (null) and for ProgID = C: (6).
I've tried designing some queries using wizard, but without luck. Would
appreciate any help with this.
Thanks.
-Amit
I have the following tables in my database:
1. tblOrg (OrgID*, OrgName)
2. tblProg (ProgID*, ProgName)
3. tblProgOrg (OrgID*, ProgID*)
since there is a many-to-many relationship between Org and Prog.
I need to get a list of OrgIDs for each ProgID where the OrgID is exclusive
to that ProgID. I will be entering the ProgID as parameter.
e.g.
OrgID ProgID
--------------
1, A
1, B
1, C
2, A
3, A
3, B
4, B
4, C
5, A
6, C
So, I need the following query result for ProgID = A: (2, 5) since those are
the two OrgIDs for A that do not occur with any other ProgID.
For ProgID = B: (null) and for ProgID = C: (6).
I've tried designing some queries using wizard, but without luck. Would
appreciate any help with this.
Thanks.
-Amit