Welcome to SPN

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

Sign Up Now!
  1. Guest ji, please consider donating today!
      Become a Supporter    ::   Make a Contribution   
    Monthly Recurring Target: $300 :: Achieved: $95

Qry not returning all records

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

  1. lmv

    lmv
    Expand Collapse
    Guest

    I am trying to get this to give me all the categories in the LEBAEst_Cost I
    have tried a number of things in the list first, last, sum, where etc and I
    don't know enough about SQL/VBA to fix the problem. This report is
    calculating a number of things right but it is not giving me ALL of the
    records in the LEBAEst_Cost table.
    Can anybody help?

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

    Similar Threads Forum Date
    Christianity The Path of Returning to God Interfaith Dialogues Feb 6, 2011
    Returning to SPN Announcements Nov 2, 2006
    Returning to sikhi, actually... Announcements Feb 14, 2006
    Christianity will religions join with the returning of Jesus? Interfaith Dialogues Jun 28, 2005

  3. Pat Hartman\(MVP\)

    Pat Hartman\(MVP\)
    Expand Collapse
    Guest

    Inner Joins return only records that have data in both tables. You may need
    to change the join type to Left instead of Inner.
    "lmv" <lmv@discussions.microsoft.com> wrote in message
    news:96A9A345-E010-486F-8804-AA10C31B2F3E@microsoft.com...
    >I am trying to get this to give me all the categories in the LEBAEst_Cost I
    > have tried a number of things in the list first, last, sum, where etc and
    > I
    > don't know enough about SQL/VBA to fix the problem. This report is
    > calculating a number of things right but it is not giving me ALL of the
    > records in the LEBAEst_Cost table.
    > Can anybody help?
    >
    > SELECT qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
    > qryPurchaseOrderRpt.CategoryName, qryPurchaseOrderRpt.MainCatID,
    > qryPurchaseOrderRpt.MainCatName, [EST_S-84a].LEBAEst_Cost,
    > Sum(qryPurchaseOrderRpt.ExtendedPrice) AS SumOfExtendedPrice
    > FROM [EST_S-84a] INNER JOIN qryPurchaseOrderRpt ON [EST_S-84a].Category =
    > qryPurchaseOrderRpt.CategoryID
    > GROUP BY qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
    > qryPurchaseOrderRpt.CategoryName, qryPurchaseOrderRpt.MainCatID,
    > qryPurchaseOrderRpt.MainCatName, [EST_S-84a].LEBAEst_Cost
    > HAVING (((qryPurchaseOrderRpt.ProjectID) Like [What Project ID?
    > Example:LEBA] & "*"));
    >
     
  4. lmv

    lmv
    Expand Collapse
    Guest

    I changed that but it still isn't giving me all of the records. The budget

    "Pat Hartman(MVP)" wrote:

    > Inner Joins return only records that have data in both tables. You may need
    > to change the join type to Left instead of Inner.
    > "lmv" <lmv@discussions.microsoft.com> wrote in message
    > news:96A9A345-E010-486F-8804-AA10C31B2F3E@microsoft.com...
    > >I am trying to get this to give me all the categories in the LEBAEst_Cost I
    > > have tried a number of things in the list first, last, sum, where etc and
    > > I
    > > don't know enough about SQL/VBA to fix the problem. This report is
    > > calculating a number of things right but it is not giving me ALL of the
    > > records in the LEBAEst_Cost table.
    > > Can anybody help?
    > >
    > > SELECT qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
    > > qryPurchaseOrderRpt.CategoryName, qryPurchaseOrderRpt.MainCatID,
    > > qryPurchaseOrderRpt.MainCatName, [EST_S-84a].LEBAEst_Cost,
    > > Sum(qryPurchaseOrderRpt.ExtendedPrice) AS SumOfExtendedPrice
    > > FROM [EST_S-84a] INNER JOIN qryPurchaseOrderRpt ON [EST_S-84a].Category =
    > > qryPurchaseOrderRpt.CategoryID
    > > GROUP BY qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
    > > qryPurchaseOrderRpt.CategoryName, qryPurchaseOrderRpt.MainCatID,
    > > qryPurchaseOrderRpt.MainCatName, [EST_S-84a].LEBAEst_Cost
    > > HAVING (((qryPurchaseOrderRpt.ProjectID) Like [What Project ID?
    > > Example:LEBA] & "*"));
    > >

    >
    >
    >
     
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