This one is driving me nuts!
I created a SET set_demo_group.set from two tables (tbl_demographics.dbf and tbl_randomization.dbf) in a 1to1 relationship with the common key field that is unique to both tables and does not repeat in either table.
I have built an a5w page with Xbasic code to extract a count of records in the set based on limiting criteria in field values.
The code seems to work as long as the field limiters in the query are contained in the parent table (tbl_demographics) and not in the child table (tbl_randomization). This is interesting because I am only querying the set and not the tables independently.
Example code follows:
Anyone have any ideas about this? Can someone confirm that in a set one cannot use fields from the child table as references in an Xbasic query?
I created a SET set_demo_group.set from two tables (tbl_demographics.dbf and tbl_randomization.dbf) in a 1to1 relationship with the common key field that is unique to both tables and does not repeat in either table.
I have built an a5w page with Xbasic code to extract a count of records in the set based on limiting criteria in field values.
The code seems to work as long as the field limiters in the query are contained in the parent table (tbl_demographics) and not in the child table (tbl_randomization). This is interesting because I am only querying the set and not the tables independently.
Example code follows:
Code:
Dim CM as C DIM CM_ATMod as C Dim ATMod as C CM = a5_get_records_in_query("[PathAlias.ADB_Path]\set_demo_group.set", "Gen = 'M' .and. Race = 'C'") ? CM returns a correct Number as both Gen and Race are in the parent table of the set. CM_ATMod = a5_get_records_in_query("[PathAlias.ADB_Path]\set_demo_group.set", "Gen = 'M' .and. Grp_no = '1' .and. Race = 'C'") ? CM_ATmod returns zero which his not correct. Does not work I think because Grp_no is in the child table of the set. ATMod = a5_get_records_in_query("[PathAlias.ADB_Path]\set_demo_group.set", " Grp_no = '1'") ? ATMod returns zero also which is not correct. Does not work again I think because Grp_no is in the child table of the set.
Comment