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 > JOINING TABLES USING executeQBE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Posts: 3
JOINING TABLES USING executeQBE

I am trying to join two tables using executeqbe to use the output in a report. The common key for both tables in this case is the "WORK ORDER NUMBER". Can anyone tell me the correct format for joing the two tables? I tried typing JOIN, just prior to the check and ~s but that did not work. Thanks.


method pushButton(var eventInfo Event)
var
r Report
q Query
s String
endVar

s = WORK_ORDER_NUMBER.value

q = Query

ANSWER: :PRIV:ANSWER.DB

FLEET SERVICE.DB | WORK ORDER NUMBER | UNIT | LTD HOURS |
| Check ~s | CHECK | CHECK |

FLEET SERVICE NOTES JD.DB| WORK ORDER NUMBER |TYPE |SEGMENT |
| Check ~s | CHECK | CHECK |
EndQuery

executeQBE(q)


r.open("FLEET SERVICE-OPEN WORK ORDER")


endmethod

Last edited by SUBROMAN; 11-13-12 at 11:11.
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Dec 2007
Posts: 341
seen here, the query structure looks correct.. is the linked field the same type in both tables?.. if you do it interactively, what error do you get?
__________________
--
Steven Green - Myrtle Beach, South Carolina USA

http://www.OasisTradingPost.com

Oasis Trading Post
- Collectibles and Memorabilia
- Vintage Lego Sets and Supplies
- and Paradox Support, too
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Posts: 3
Joining tables using executeqbe

Here is the latest iteration, when I run it interactively and manually input the search string it runs fine. When I run it off the button the query runs but does not retrieve any recrods. I must have an error on my join or string but i have not been able to figure it out.




method pushButton(var eventInfo Event)
var
r Report
q Query
s String
endVar

s = WORK_ORDER_NUMBER.value

q = Query

ANSWER: :PRIV:ANSWER.DB

FLEET SERVICE.DB | WORK ORDER NUMBER | UNIT MODEL |
| _JOIN1, CHECK ~s | CHECK | CHECK |

FLEET SERVICE NOTES JD.DB |WORK ORDER NUMBER | TYPE |
| _JOIN1, CHECK | CHECK |
EndQuery

executeQBE(q)

;r.print("ORDER")
r.open("FLEET SERVICE-OPEN WORK ORDER")


endmethod
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Dec 2007
Posts: 341
most likely error.. what are the field types, what is ~s ?? if s is a string, but that field is a number or a short, the query will run, but the table will be empty..
__________________
--
Steven Green - Myrtle Beach, South Carolina USA

http://www.OasisTradingPost.com

Oasis Trading Post
- Collectibles and Memorabilia
- Vintage Lego Sets and Supplies
- and Paradox Support, too
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Posts: 3
Joining tables using executeqbe

Yes, ~s is a string, the field is a alpha numeric field. Is there something I can add to the coding to allow for that?
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Dec 2007
Posts: 341
alpha-numeric is a string, too.. take this to the community site, you'll get other ideas

Support - Paradox Community
__________________
--
Steven Green - Myrtle Beach, South Carolina USA

http://www.OasisTradingPost.com

Oasis Trading Post
- Collectibles and Memorabilia
- Vintage Lego Sets and Supplies
- and Paradox Support, too
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