I am writing an application to show students financial funding avaialable to them.
There are certain 'flags' that the users can select (e.g. disabled, mature, have kids), which will affect which funds are available to them.
The table below, FlagsRequired, shows the Fund and the Flags that have to be selected by the user in order to qualify for that fund.
The problem is that I need to select the funds from this table only if all the flags associated with that fund have been selected. For example, FundNameID 7 should have flags 2 and 8 selected to be avialable to the student.
The way my app is working is to pass the flags selected as a list.
I need to write a query that can select a Fund if multiple flags have been selected.
Example, I have ticked flags 1, 2, 5 and 8. From the table above, I would expect records with FundNameID 2 and 7 to be selected.
Similarly, if I had selected flags 7 and 8, I would expect records with a FundNameID of 6 and 9 to be selected (not 7).
Thanks in advance if anyone can help.
0 · ·