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

Find first instance of a record

KJ
We use a third party software package for acctg that limits us on
field size - as a result, we at times have to enter an item into the
app multiple times in order to get all the information. I then
created an Access DB that is linked to the information and have
combined all data onto one record so that we can export to excel. The
next step for me is to eliminate all the other instances of this
particular item, leaving me with only the first instance of that item
no (so that I am left with just the combined data record).

The only thing that differentiates the items are their sequence number
- other than that, they have the same item no, description, etc.

If anyone has a method for extracting just the first instance of a
record that would be a great help.

Thanks!!
Nov 12 '05 #1
4 12971
If the combined text is not in a Memo field, Just do a Group By query, group
by all the columns except the ID, and use the Min aggregate in the ID column.

On 3 Nov 2003 09:44:55 -0800, ka****@motioneng.com (KJ) wrote:
We use a third party software package for acctg that limits us on
field size - as a result, we at times have to enter an item into the
app multiple times in order to get all the information. I then
created an Access DB that is linked to the information and have
combined all data onto one record so that we can export to excel. The
next step for me is to eliminate all the other instances of this
particular item, leaving me with only the first instance of that item
no (so that I am left with just the combined data record).

The only thing that differentiates the items are their sequence number
- other than that, they have the same item no, description, etc.

If anyone has a method for extracting just the first instance of a
record that would be a great help.

Thanks!!


Nov 12 '05 #2
Thanks for the suggestion - I have tried that method and not been
successful and have also tried choosing First. Is there some trick that
I am missing?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
using "min" only identifies the first record, to erase all other records,
you need to create a second "delete query" that links the "minimum record
id" select query to the whole table (on all key fields), set the join
properties so that all records from the whole table are included, and set
the criteria so that only records with a null key field from the "minimum
record id" query are deleted. presto!

i hope this helps you. the previous poster is correct. this will work if
you do it right.

regards,
michael.

"Karyn Jervis" <ka****@motioneng.com> wrote in message
news:3f*********************@news.frii.net...
Thanks for the suggestion - I have tried that method and not been
successful and have also tried choosing First. Is there some trick that
I am missing?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #4
Try using "First" under Totals in the query.

For Example:
SELECT First(Table1.a) AS FirstOfa, First(Table1.b) AS FirstOfb,
First(Table1.c) AS FirstOfc, First(Table1.d) AS FirstOfd
FROM Table1
HAVING (((First(Table1.a))="this") AND ((First(Table1.b))="is") AND
((First(Table1.c))="a") AND ((First(Table1.d))="test"));

It seemed to do what you were looking for.

ka****@motioneng.com (KJ) wrote in message news:<1a*************************@posting.google.c om>...
We use a third party software package for acctg that limits us on
field size - as a result, we at times have to enter an item into the
app multiple times in order to get all the information. I then
created an Access DB that is linked to the information and have
combined all data onto one record so that we can export to excel. The
next step for me is to eliminate all the other instances of this
particular item, leaving me with only the first instance of that item
no (so that I am left with just the combined data record).

The only thing that differentiates the items are their sequence number
- other than that, they have the same item no, description, etc.

If anyone has a method for extracting just the first instance of a
record that would be a great help.

Thanks!!

Nov 12 '05 #5

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

Similar topics

3
by: Professor Frink | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
2
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
7
by: Not Me | last post by:
Hi, Having a table with some duplicate ID's (different data tho), how can I return the list but with only one record from each ID? Would this be using the first() function and grouping? ...
3
by: Sarah Smith via AccessMonster.com | last post by:
I am creating a database of documents that need to be worked on, are int eh proress of being worked on, and have been completed. Sometimes the same document (an updated version) comes back for more...
3
by: oscar | last post by:
i've created a search function, using vc#, and i'm using the dataview.find() method to get the index of the found record. the problem is that there are many similar names. it always returns the...
3
by: POL8985 | last post by:
The application is developed in ASP.Net with a SQL Server database. Essentially, the application uses a single shared Connection object for all users logged into the system. The connection...
7
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent...
0
by: Bernd R. | last post by:
Hi, I am accessing an Access Database with VB.net 2005 with ADO.net. The data are displayed on a form in Text Boxes (there is no grid on the form). Now I'd like to place a ComboBox on the form...
5
by: paragpdoke | last post by:
Hello All. I am new to SQL ... trying to make a query work untimately in Perl (v5.10.0 built for MSWin32-x86-multi-thread) against MySQL hosted remotely (which currently I don't know the version...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.