Results 1 to 2 of 2

Thread: Creating Query

  1. #1
    Join Date
    Jul 2006
    Posts
    157

    Unanswered: Creating Query

    Hi:
    Can any one please tell me how to i write a query if TableB field MatchField contains value FieldB then FieldB join with FieldD of TableD and FieldS match with FieldSS. If MatchField contains value FieldC then FieldC join with FieldD of TableD and FieldS match with FieldSS. If MatchField contains value of FieldK then FieldK join with FieldD of TableD and FieldS match with FieldSS. If FieldS is not match with FieldSS but other fields of TableB FieldB, FieldC, FieldK match with FieldD of TableD it still print the result.

    TableB
    ------
    KeyField
    FieldB
    FieldC
    FieldK
    FieldS
    MatchField

    TableD
    -------
    FieldD
    FieldSS

    Result
    ------
    FieldB, FieldC, FieldK, FieldD, FieldSS

    Thanks.

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    ... if FieldA equals FieldB then see if Field C is FieldA so that, no wait, FieldB has to be like FieldA then, oh crap, was it FieldC?

    I think I've had a bit much wine for this one, but here's some advice:

    Play around with the query builder and use several queries ... you won't suffer a performance hit (Access makes multiple hidden queries to simplify complicated queries anyway).

    tc


Posting Permissions

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