473,402 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Stop repeat records in query

T
My table has the following fields

ItemNo Name ImageName DateRecd
123 Foo 00123.jog 1/1/06
123 Foo 00FOO.jpg 10/11/06
123 FOO FOO123.jpg 7/5/04
456 bar 00456.jog 6/10/06
456 BAR 00BAR.jpg 7/5/00
456 Bar BAR456.jpg 11/23/06

How would I write / get a query to run and show me, the 2nd item
numbers, the 123 but only the most recent date so 10/11/06 and for
itemno 456 the item dated 11/23/06

Nov 29 '06 #1
1 2623
"T" <te****@wideopenwest.comwrote in
news:11**********************@80g2000cwy.googlegro ups.com:
My table has the following fields

ItemNo Name ImageName DateRecd
123 Foo 00123.jog 1/1/06
123 Foo 00FOO.jpg 10/11/06
123 FOO FOO123.jpg 7/5/04
456 bar 00456.jog 6/10/06
456 BAR 00BAR.jpg 7/5/00
456 Bar BAR456.jpg 11/23/06

How would I write / get a query to run and show me, the 2nd
item numbers, the 123 but only the most recent date so
10/11/06 and for itemno 456 the item dated 11/23/06
What do you mean: second item numbers, that's not a column in
the table.

I'm guessing you want

123 10/11/06 00FOO.jpg
456 11/23/06 BAR456.jpg

Create a summation query to group on ItemNo and max on daterecd,
then join that query back to your table on query.ItemNo
=table.ItemNo and query.MaxDateRecd = table.DateRecd


--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Nov 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tom | last post by:
Anyone help on this? PHP/MySQL I have a repeat region displaying records from orders in a CSV format: CalJoe33,18,08/23/2004,FED EX,PREPAID,WEBSITE,CA,Book,25.95,??? CalJoe33,18,08/23/2004,FED...
8
by: duncan.lovett | last post by:
PHP 4 MySQL 4.0.20 DW MW 2004 7.01 This problem is giving me a bit of a headache, and I'm getting nowhere with it so thought I'd open it up to all, any help would be greatly appreciated. ...
6
by: Nimesh | last post by:
I need to find customer's names that repeat / occur more than once in the same table. I have treid many options and I have tried comparing the column to itself but Oracle gives me an error. ...
1
by: jaYPee | last post by:
anyone know how to create a report that will repeat itself but with different label in the second details. example ...
2
by: Melissa | last post by:
I have a grouped report that starts a new page at each group. All the field labels for the report are in the group header because there is a subreport in the top part of the report that needs to...
1
by: ChrisMoss | last post by:
I have written a macro that I want to repeat until there are no more records to append (i.e., append zero rows). Is there a way for a condition to be applied to the macro that can detect if no...
4
kcdoell
by: kcdoell | last post by:
Hello: What is the best way to stop a report from running if the query is empty? Currently, I have a form that has a command button on it. The user has to make selections from 3 combo boxes on...
7
by: MNNovice | last post by:
I have 3 queries that show expenses on various projects/funds. I would like to combine the results and show various expenses on each project/fund etc. But when I try to combine these 3 queries,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.