Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Creating a Query

Status
Not open for further replies.

Wray69

Technical User
Oct 1, 2002
299
US
I have a table with sales figures for the year and I need to bring back the items that sold in the first part of the year but not in the second. Can anyone give me any advice on how to accomplish this?

Regards -

Wray
 
Please could you give me some details of column headings/ data stored in the table?

I'll then take a look and see what I can do.

Thanks,

Dodgy Chris
-----------------------------------

confucious say : better to save a mans life than to build 7 storey pagoda
 
The first feild is product code, (has a five digit code) second field is a product descrition, the third is the date the product was sold and the fourth is the quanity sold.

I need to find products that were sold in the first half of the year but not sold in the second half.

Thanks -

Wray
 
select * from table
where date_sold between #01/04/2003# and #30/09/2003#

Obviously you could change the dates to whatever you need, or you could have it as

select * from table
where date_sold between [Enter Start Date] and [Enter End Date]

at which point you can dynamically choose any date selection you like.

Hope this helps, Dodgy Chris
-----------------------------------

confucious say : better to save a mans life than to build 7 storey pagoda
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top