Results 1 to 6 of 6
  1. #1
    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.

  2. #2
    Join Date
    Dec 2007
    Posts
    348
    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

  3. #3
    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

  4. #4
    Join Date
    Dec 2007
    Posts
    348
    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

  5. #5
    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?

  6. #6
    Join Date
    Dec 2007
    Posts
    348
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •