View Full Version : Need help on Query


darreno
09-10-2008, 11:09 AM
I have a query with the following columns:

ID, Customer, MthQty, BeginDate, EndDate, Jan,Feb,Mar....up to Dec

If MthQty is 1000 and BeginDate is 1/1/08 and EndDate is 6/30/08, columns Jan to Jun will contain 1000.

I need to run a query that will pull up sales for a particular month only. My query is giving me results from all other months:

SELECT *
FROM qry_Sales
WHERE (((qry_Sales.Jan)>1));

Thanks for any advice.

khawar
09-11-2008, 10:28 AM
SELECT qry_Sales.Jan
FROM qry_Sales
WHERE (((qry_Sales.Jan)>1));

khawar
09-11-2008, 10:33 AM
also want to give you an advice to change your table structure you should not have Jan feb .... upto dec in your table these can be calculated in the query