Recent content by Ach

  1. A

    Retreive all fields and count

    Well I was able to get the right results with the following query: SELECT Sales.Product, Sales.Salesdate, Sales.Retailer FROM Sales, ( SELECT Sales.Salesdate, Sales.Product FROM Sales GROUP BY Sales.Salesdate, Sales.Product HAVING Count(Sales.Product)>=2 ) as t1 WHERE (Sales.Product=...
  2. A

    Retreive all fields and count

    Well, I can't execute the query. I get the "You tried to execute a query that inlcudes "RETAILERS" as part of an aggregate function". If I add it to group by then all fields are empty. I have a feeling I need some kind of a subquery here but I can't wrap my head around it.
  3. A

    Retreive all fields and count

    Hey all, I'm having a hard time getting the output below from a query and was wondering if anyone would be able to reproduce this. Basically I'm trying to retrieve products that have more than 5 sales on a specific date and the retailers they sold at. I have the following simplified table...
  4. A

    Getting the count of various rows in one query.

    I see your point regarding the crosstab advantages. Now that I'm familiar with two ways of doing this I can choose the best one regarding the situation. You've been tremendous help.
  5. A

    Getting the count of various rows in one query.

    I was able to get the same results with this but without any row headings like the crosstab generates. Was wondering if this method is generally accepted as good query design or any other thoughts anyone has. SELECT * FROM (SELECT Count(color) AS BLUE FROM COLORS WHERE Color="blue") AS...
  6. A

    Getting the count of various rows in one query.

    Is it possible to do the same without crosstab queries, by using normal queries?
  7. A

    Getting the count of various rows in one query.

    Nevermind, I was able to work it out. thanks again.
  8. A

    Getting the count of various rows in one query.

    Awesome. Now I have to read up on crosstab queries. There is one quetion i forgot to mention. I have two products int he above table with null or empty values. How would i be able to count these values also with this method. At the moment I get zero, but I have two products that statisfy these...
  9. A

    Getting the count of various rows in one query.

    I've been toying with this for a few hours but I always end up with the wrong result. Hopefully an expert here can provide some insight. I have a table called colors with two columns PNAME and COLOR. There are various products and only three possible colors. E.g: Tablename: COLORS PNAME...
  10. A

    Validation rules in CREATE TABLE statement

    Wow. I expected a one line response. Thank you for taking the time to write that out. Very helfpul.
  11. A

    Validation rules in CREATE TABLE statement

    Hi, I'm fairly new to Access and I'm trying to figure out how to create a validation rule via SQL. I searched through the forums but didn't find anything. Hope someone can point me in the right direction. For simplicity say I have the following extremely simple CREATE STATEMENT. CREATE TABLE...
Back
Top Bottom