473,383 Members | 1,853 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,383 software developers and data experts.

select without duplicates

my data is like so.

Id Date Transaction
545 9/24/2003 3:01:08 PM 13051:10
546 9/24/2003 3:03:30 PM 13051:10
538 9/24/2003 2:53:31 PM 13051:1002
539 9/24/2003 2:54:57 PM 13051:1002
136 9/24/2003 10:08:45 AM 13051:101
137 9/24/2003 10:08:47 AM 13051:101

I wanna run a query that gives me
Id Date Transaction
545 9/24/2003 3:01:08 PM 13051:10
538 9/24/2003 2:53:31 PM 13051:1002
136 9/24/2003 10:08:45 AM 13051:101

The first record of the duplicates
Jul 20 '05 #1
1 7870
select id, date, transaction
from mytable
where id in
(select min(id) from mytable group by transaction)
Regards,
Dave
"Vincent Jones" <vn****@hotmail.com> wrote in message
news:ba**************************@posting.google.c om...
my data is like so.

Id Date Transaction
545 9/24/2003 3:01:08 PM 13051:10
546 9/24/2003 3:03:30 PM 13051:10
538 9/24/2003 2:53:31 PM 13051:1002
539 9/24/2003 2:54:57 PM 13051:1002
136 9/24/2003 10:08:45 AM 13051:101
137 9/24/2003 10:08:47 AM 13051:101

I wanna run a query that gives me
Id Date Transaction
545 9/24/2003 3:01:08 PM 13051:10
538 9/24/2003 2:53:31 PM 13051:1002
136 9/24/2003 10:08:45 AM 13051:101

The first record of the duplicates

Jul 20 '05 #2

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

Similar topics

3
by: bellefy | last post by:
Hi All, I have a fairly large table with approx 30K rows that updates every night via a cron script that automatically downloads the 2 new csv's. The problem is the files are downloaded from...
4
by: Justin Koivisto | last post by:
OK, out of my element here once again... I want a query (or something I can use as a record source for a report) to do the following: * look in 2 tables (one field each) to find all entered...
1
by: rickn | last post by:
Being new to VB and programming, I'm not sure how to modify the following or if required have a Select statement to NOT allow any duplicates. I'm trying not to have any duplicates in the LOTNUM_72...
6
by: Bob Stearns | last post by:
I am getting duplicate rows back from a select distinct statement of the form: SELECT DISTINCT 'jhough', '000111', t0.bhid FROM (SELECT lots of good stuff) t0 LEFT OUTER JOIN another_table ...
1
by: JC | last post by:
Hello, I am trying to change a select, find duplicates, query into a delete query. I want to get rid of the records in the main table "tblHurnsHistory." I changed the Find Duplicates query to...
4
by: Mokita | last post by:
Hello, I am working with Taverna to build a workflow. Taverna has a beanshell where I can program in java. I am having some problems in writing a script, where I want to eliminate the duplicates...
9
by: P3Eddie | last post by:
Hello all! I don't know if this can even be done, but I'm sure you will either help or suggest another avenue to accomplish the same. My problem may be a simple find duplicates / do something...
5
by: limperger | last post by:
Hello everyone! Is out there any way to search for duplicate entries without using the "Find duplicates" option? In the Access 97 installed in my workplace, the Find duplicates option is disabled...
2
by: pedalpete | last post by:
I seem to have a few duplicates entries in a very large database. My database has two identical tables. One is written to on a regular basis (every few seconds) and the other is used for queries,...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.