Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

SQL qry Report??

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

Tags:
  1. lmv

    lmv
    Expand Collapse
    Guest

    Can someone tell me how to take the following sql and adjust it so that the
    LEBAEst_Cost will only appear once per categoryID.
    The report has 3 columns Budget /Actual /Difference
    Budget is LEBAEst_Cost
    Actual is Extended Price
    and Difference is Actual -Difference
    There can be many items in one CategoryID that get totaled in the
    Actual /Extended Price I have a non visible text and then a visible txt over
    the top that is =Sum([ExtendedPrice]) in the CategoryID footer
    Then another 3 text boxes in MainID footer LEBAEst_Cost and
    =Sum([ExtendedPrice]) and the 3rd box is unbound at this time because I can't
    figure it out.

    This may be totally whacked but I don't know how to get this to total and I
    can't find an example to copy the idea from. My Actual is totalling correctly
    but the Budget is almost double what it should be and so of course the
    difference is wrong.

    SELECT qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
    qryPurchaseOrderRpt.MainCatID, qryPurchaseOrderRpt.CategoryName,
    qryPurchaseOrderRpt.MainCatName, [EST_S-84a].LEBAEst_Cost,
    qryPurchaseOrderRpt.ExtendedPrice
    FROM [EST_S-84a] RIGHT JOIN qryPurchaseOrderRpt ON [EST_S-84a].Category =
    qryPurchaseOrderRpt.CategoryID
    GROUP BY qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
    qryPurchaseOrderRpt.MainCatID, qryPurchaseOrderRpt.CategoryName,
    qryPurchaseOrderRpt.MainCatName, [EST_S-84a].LEBAEst_Cost,
    qryPurchaseOrderRpt.ExtendedPrice
    HAVING (((qryPurchaseOrderRpt.ProjectID) Like [What Project ID?
    Example:LEBA] & "*"));

    Any help is appreciated
    Thanks
     
  2. Loading...

    Similar Threads Forum Date
    Microsoft Brings 64-Bit Perks in SQL Server 2000 Service Pack (Ziff Davis) Interfaith Dialogues May 7, 2005

Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page