|
-
Aug 23rd, 2004, 02:24 PM
#1
Thread Starter
Giants World Champs!!!!
Counting Records with Case
I have a table that has a date field and an item field. I want to compare the number of items sold this to the amount sold last year. I know I have to use the Case statement but I can't remember how to do it
Data in Table1:
Date Item
1/1/2004 Apples
3/5/2004 Oranges
2/5/2003 Grapes
5/15/2003 Oranges
The output:
Item 2004 2003
Apples 1 0
Grapes 0 1
Oranges 1 1
Thank in advance!!!!
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|