Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2008
    Location
    Suburb of Chicago, Illinois
    Posts
    56

    Unanswered: MS Access 2003 query

    Need to fix the selection criteria logic for DeliveredDate.
    Trying to add: IIf>([BillingEndDate]) (i.e., Only show the DeliveredDate if it is greater than the BillingEndDate)

    Following is current SQL code:

    SELECT dbo_SI_Main_DEV.ConfigurationId, dbo_SI_Main_DEV.ModelSeries, Max(dbo_SI_Main_DEV.BillingEndDate) AS MaxOfBillingEndDate, Max(dbo_SI_Shipments_DEV.ValidToDate) AS MaxOfValidToDate, Max(dbo_SI_Shipments_DEV.DeliveredDate) AS MaxOfDeliveredDate, dbo_SI_Shipments_DEV.ShippedQty
    FROM dbo_SI_Main_DEV INNER JOIN dbo_SI_Shipments_DEV ON dbo_SI_Main_DEV.ConfigurationId = dbo_SI_Shipments_DEV.ConfigurationId
    GROUP BY dbo_SI_Main_DEV.ConfigurationId, dbo_SI_Main_DEV.ModelSeries, dbo_SI_Shipments_DEV.ShippedQty
    HAVING (((Max(dbo_SI_Main_DEV.BillingEndDate))<#12/31/2010#) AND ((dbo_SI_Shipments_DEV.ShippedQty)<>0))
    ORDER BY dbo_SI_Main_DEV.ConfigurationId DESC;

  2. #2
    Join Date
    Dec 2010
    Posts
    31
    IIF([DeliveredDate]>[BillingEndDate],[DelieveredDate],"")

    This is assuming you don't want to see anything if DelieveredDate is less than BillingEndDate.

  3. #3
    Join Date
    Mar 2008
    Location
    Suburb of Chicago, Illinois
    Posts
    56
    Thanks RickyTicky!
    That did it.
    Case closed.

Posting Permissions

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