I am using SQL select in VFP6 and I have two tables with a “One to Many” relationship. Person.dbf & Codes.dbf
I want to select all the people from the person table that have both code A1 and code A2 on the code table. The problem I have is that on the Code table these two codes would be on two different records (One record per code).
I know I can Query on the individual codes building two cursors and then inner join them back to the person table but this seems massively long-winded.
Does anyone have any ideas about a good way to do this baring in mind I will probably be querying massively more complex codes than the example above?
Appreciate the help in advance
Chris
I want to select all the people from the person table that have both code A1 and code A2 on the code table. The problem I have is that on the Code table these two codes would be on two different records (One record per code).
I know I can Query on the individual codes building two cursors and then inner join them back to the person table but this seems massively long-winded.
Does anyone have any ideas about a good way to do this baring in mind I will probably be querying massively more complex codes than the example above?
Appreciate the help in advance
Chris