Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2001
    Posts
    175

    Unanswered: Problem with Query

    I have a query which consist of 2 tables (insoi and polins)

    The fields for insoi are:
    oiseqno (Primary Key)
    insno
    invno
    clientno
    etc......

    The fields for polins are:
    polseqno (Primary key)
    insno
    clientno
    invno
    polno
    etc.....

    When I attempt to join the tables on the invno field I am getting no rows returned in the query. What am I doing wrong?

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by toukey1
    What am I doing wrong?
    I dont know....
    first off Id check there is some data that matches, so you start off by knowing that its a design problme rather than a data problem

    Then....
    Id check the two columns data types were Identical (In terms of type , or if its a text column size

    It would help if you define a relationship between the two tabels and a throd table called say (lets see now.....) DTInvoices

    It would help if you posted your query which is returning no rows
    it would help if you post your table(s) design
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    This looks like the start of the nightmarish database I've been working with in Progress where several fields are duplicated in each table. Just establish (i.e. create) a foreign key (integer data type) in your polins table (called: oiseqno) and establish a link (primary-foreign key relationship) between these 2 fields in these 2 tables. There's no need to duplicate all the same fields in your polins table - you can join the two tables between the oiseqno fields.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Nov 2006
    Location
    Quebec
    Posts
    172
    show us your query and some demo data... the more info you give the better answer you get...

    peace

Posting Permissions

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