Query Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric

    #1

    Query Problem

    In Tbl_ValidDisput e i have to search all three otheraccounts. First if
    otherAcct3 is not empty and match first five digit with tech_id.CORP
    and also match the LstVldTech with tech_id.TECH and if they both match
    then print the report. If otherAcct3 is empty but otherAcct2 is not
    empty then match first five digit with tech_id.CORP also match
    LstVldTech with tech_id.TECH if both match then print the report. if
    otherAcct2 and otherAcct3 is empty then match with otherAcct1 and print
    the report.

    Tbl_ValidDisput e
    -----------------
    TicketNum
    LstVldTech Type Text 00000
    OtherAcct1 Type Text 00000-000000-00
    OtherAcct2 Type Text 00000-000000-00
    OtherAcct3 Type Text 00000-000000-00

    Tech_ID
    -------
    ID PK
    CORP Type Text 00000
    Tech Type Text 00000
    TECHCONT Type Text

  • pietlinden@hotmail.com

    #2
    Re: Query Problem

    Sounds like you could solve this problem by normalizing and using the
    OnNoData event of the report, or get the recordcount of the report's
    rowsource and then respond to the NoData event. But you see the
    problems with the denormalized data structures?

    1. no "intelligen t" keys - each field should contain only one piece of
    information, so you don't need any of this splitting the primary key or
    whatever.
    2. make the otherAcct stuff a child table. Then you can just query.
    If you have a match, you can return it with a simple query, otherwise,
    you won't get records

    Comment

    Working...