Here's my problem:
I have two tables and they share a common key. Let's call them table A and table B. The key is alphabetical, 9 characters.
Table A has details. Table B tracks instances that table A items occur, i.e. date and order of item appearance on that date, by set and order within the set. Table B may have, say, 35 records of table A referenced for a particular date. But the only cross reference is the common alphabetical key.
Again, Table B also has info about the order that things in table A appeared on any particular date that happens to reference a particular Table A record. The references appear in sets, and each set has an order of item appearance. Those fields in table B are set_num and select_num (integer fields). If set_num is 4, it's the 4th set that occurred on the particular date. select_num for a record in table B refers to the position that record has in a particular set. Thus, a table A item for that date may appear in set_num 4 and select_num 6, which is right after set_num 4, select_num 5, when the table B's index is set to DATESORT, which is ordered by date/set_num/select_num in that order.
I am interested in seeing info of table A pertaining to a particular appearance in table B. Thus, if there's a reference to a certain item in table A for a specific date in table B, I want to see info for table A for all records that appear in a specific set in table B for that date. I did this with a select and a subquery. Here's the code:
sele proper(artist), proper(title), recordings, album, evaluation, play, airplay, theme from rec where rec.key ;
in (select key from airec where date=msetdate and set_num=mset_num)
Here I had already determined the msetdate and the mset_num variables. This works, however I'm not happy with the browse that pops up because I want to see the records in select_num order, that is the order they appear in table B. I'm sure this is doable, but the solution is eluding me.
I have two tables and they share a common key. Let's call them table A and table B. The key is alphabetical, 9 characters.
Table A has details. Table B tracks instances that table A items occur, i.e. date and order of item appearance on that date, by set and order within the set. Table B may have, say, 35 records of table A referenced for a particular date. But the only cross reference is the common alphabetical key.
Again, Table B also has info about the order that things in table A appeared on any particular date that happens to reference a particular Table A record. The references appear in sets, and each set has an order of item appearance. Those fields in table B are set_num and select_num (integer fields). If set_num is 4, it's the 4th set that occurred on the particular date. select_num for a record in table B refers to the position that record has in a particular set. Thus, a table A item for that date may appear in set_num 4 and select_num 6, which is right after set_num 4, select_num 5, when the table B's index is set to DATESORT, which is ordered by date/set_num/select_num in that order.
I am interested in seeing info of table A pertaining to a particular appearance in table B. Thus, if there's a reference to a certain item in table A for a specific date in table B, I want to see info for table A for all records that appear in a specific set in table B for that date. I did this with a select and a subquery. Here's the code:
sele proper(artist), proper(title), recordings, album, evaluation, play, airplay, theme from rec where rec.key ;
in (select key from airec where date=msetdate and set_num=mset_num)
Here I had already determined the msetdate and the mset_num variables. This works, however I'm not happy with the browse that pops up because I want to see the records in select_num order, that is the order they appear in table B. I'm sure this is doable, but the solution is eluding me.