Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Where Statement

Discussion in 'Information Technology' started by PPCO, Jul 28, 2006.

  1. PPCO

    Expand Collapse

    I am making a simple select query. I want to compare 2 values and if one is
    bigger than the other, then I want my selection to be limited by that. The
    problem seems to be that one of the values is an expression so it won't let
    me compare it to the other. I know I could make an additional query that adds
    the where clause but was wondering if I can do this without doing that.
    Here's my SQL:

    SELECT tblMutualcustomers.Customer,
    Max(tblinvoiceorderlinemaketable.ShipDate) AS MaxOfShipDate,
    Date()-[maxofshipdate] AS Dayssincelastpickup,
    tblinvoiceorderlinemaketable.InvoiceLineItemRefFullName, "Computer Generated"
    AS RequestType
    FROM tblinvoiceorderlinemaketable RIGHT JOIN tblMutualcustomers ON
    tblinvoiceorderlinemaketable.CustomerRefFullName = tblMutualcustomers.Customer
    GROUP BY tblMutualcustomers.Customer,
    tblinvoiceorderlinemaketable.InvoiceLineItemRefFullName, "Computer Generated"
    HAVING (((tblinvoiceorderlinemaketable.InvoiceLineItemRefFullName) Like
    "Mutual:pallet Pickup"));

    I want records to show up where the expression

  2. Loading...

Since you're here... we have a small favor to ask...     Become a Supporter      ::     Make a Contribution     

Share This Page