I am trying to figure out a simple yet efficent way to write a query that can query multiple tables that have the same fields with information in it.... heres what i wrote so far but its not working... this may help you understand what im trying to do if you dont understand....
x=1
filename="dogs"
while x>0
tblVar.attach(":dogs:"+filename+string(x)+".db")
if isTable(tblVar)=true then
Que =
Query
SORT: tblVar->"CNUM"
tblVar | CNUM | LASTUPDATED | CKNUM | ONUM | Okey | Prevonum |
| Check | Check | Check | Check | Check | Check |
endQuery
Que.executeQBE(":dogs:answer"+string(x)+".db")
else
return
endif
x=x+1
endwhile
Basically i have multiple tables that are structured the same that have records in them, and i am trying to figure out the best way to query out information from all the tables simultaneously, ex: if i want to look up all the flavors that are chocolate in my tables, i would want to query thru all the tables on the Flavor field and get all the records added to 1 answer table. Which above i dont have that written correctly either, IF the above worked it would query one table and write an answer table, then after querying the next table write another answer table.. i dont want it to do that, i want it to write to 1 table. Any help or ideas are appreciated, thank you!