J
Jan
I have a database set up for a consignment shop. I'm trying to print a list
of crafters that had sales during a time period that I enter. I'm able to get
the info, but if a crafter had more than 1 sale during that time period,
their name is listed more than once. I want the crafter listed only once.
Below is my SQL. Please help.
Thanks,
Jan
SELECT Crafters.CrafterID, Crafters.CrafterFName, Crafters.CrafterName,
Crafters.CrafterAddress, Crafters.CrafterCity, Crafters.CrafterState,
Crafters.CrafterZip, Crafters.CrafterPhone, Sales.SalesDate,
Sales.SalesCrafterID
FROM (Crafters INNER JOIN Sales ON Crafters.CrafterID =
Sales.SalesCrafterID) INNER JOIN Items ON Crafters.CrafterID =
Items.ItemCrafterID
GROUP BY Crafters.CrafterID, Crafters.CrafterFName, Crafters.CrafterName,
Crafters.CrafterAddress, Crafters.CrafterCity, Crafters.CrafterState,
Crafters.CrafterZip, Crafters.CrafterPhone, Sales.SalesDate,
Sales.SalesCrafterID
HAVING (((Crafters.CrafterFName) Is Not Null) AND ((Sales.SalesDate)>=[Enter
Beginning Date] And (Sales.SalesDate)<=[Enter Ending Date]));
of crafters that had sales during a time period that I enter. I'm able to get
the info, but if a crafter had more than 1 sale during that time period,
their name is listed more than once. I want the crafter listed only once.
Below is my SQL. Please help.
Thanks,
Jan
SELECT Crafters.CrafterID, Crafters.CrafterFName, Crafters.CrafterName,
Crafters.CrafterAddress, Crafters.CrafterCity, Crafters.CrafterState,
Crafters.CrafterZip, Crafters.CrafterPhone, Sales.SalesDate,
Sales.SalesCrafterID
FROM (Crafters INNER JOIN Sales ON Crafters.CrafterID =
Sales.SalesCrafterID) INNER JOIN Items ON Crafters.CrafterID =
Items.ItemCrafterID
GROUP BY Crafters.CrafterID, Crafters.CrafterFName, Crafters.CrafterName,
Crafters.CrafterAddress, Crafters.CrafterCity, Crafters.CrafterState,
Crafters.CrafterZip, Crafters.CrafterPhone, Sales.SalesDate,
Sales.SalesCrafterID
HAVING (((Crafters.CrafterFName) Is Not Null) AND ((Sales.SalesDate)>=[Enter
Beginning Date] And (Sales.SalesDate)<=[Enter Ending Date]));