How to design a query with 2 tables that have date fields?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rsmlmlb

    How to design a query with 2 tables that have date fields?

    I need to create a query from 3 tables (client, work and accts recv). The client table has the unique id. The work table has wrkdte and the accounts receiveable has ardte. How can I pull the work within a certain time period along with payments within the same time period?
  • rsmlmlb

    #2
    Have I made this sound too complicated or just plain confusing.
    Here is the sql view if this could possibly help. I'm looking for an answer with in a day or 2.
    SELECT dbo_WIP.Whours, dbo_WIP.Wbilled , dbo_WIP.Wwrupdn , dbo_Clients.Clt name, dbo_WIP.Winvdat e, dbo_AcctsRec.AR Amt, dbo_AcctsRec.AR Date, dbo_AcctsRec.AR Type
    FROM dbo_AcctsRec, ((dbo_WIP INNER JOIN dbo_Clients ON dbo_WIP.WCltID = dbo_Clients.ID) INNER JOIN dbo_Employee ON dbo_WIP.WempID = dbo_Employee.ID ) INNER JOIN dbo_ServiceCode s ON dbo_WIP.WCodeSe r = dbo_ServiceCode s.SCCodeDetail
    WHERE (((dbo_WIP.Winv date) Between #1/1/2009# And #12/31/2009#) AND ((dbo_AcctsRec. ARDate) Between #1/1/2009# And #12/31/2009#) AND ((dbo_AcctsRec. ARType)=4));

    Comment

    Working...