If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Corel Paradox > Could use help writing query in script

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-10-07, 11:40
S0nY S0nY is offline
Registered User
 
Join Date: Mar 2007
Posts: 5
Question Could use help writing query in script

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!

Last edited by S0nY; 04-10-07 at 16:31.
Reply With Quote
  #2 (permalink)  
Old 06-11-07, 10:37
Shores Shores is offline
Registered User
 
Join Date: Aug 2003
Location: Bologna - Italy
Posts: 209
There is a parameter for the query that states which answer table should be used, you could use this to put all the results in a single answer table.
__________________
The only failure is not trying to do it.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On