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

Urgent Recordset problem

How do I select the First Record only based on MemberID

The layout is PhotoID,MemberID,Title

1, 666, blah1
2, 555, blah2
3, 666, blah3
4, 777, blah4
6, 777, blah5
7, 999, blah6
8, 444, blah7

So the result Im after is

1, 666, blah1
2, 555, blah2
4, 777, blah4
7, 999, blah6

Table is called TbPhoto (Using Access)
Nov 12 '05 #1
2 1177
"Andrew" <an****@nospam.com> wrote in
news:OF*************@newsfep1-gui.server.ntli.net:
How do I select the First Record only based on MemberID
Just use an aggregate query.

SELECT tbPhoto.memberID, first(tbPhoto.PhotoID)
FROM tbphoto
GROUP BY qds_MemberIDs
ORDER BY tbPhoto.PhotoID

Bob

The layout is PhotoID,MemberID,Title

1, 666, blah1
2, 555, blah2
3, 666, blah3
4, 777, blah4
6, 777, blah5
7, 999, blah6
8, 444, blah7

So the result Im after is

1, 666, blah1
2, 555, blah2
4, 777, blah4
7, 999, blah6

Table is called TbPhoto (Using Access)


Nov 12 '05 #2
something like this, maybe?

SELECT Min(MyData.Field1) AS MinOfField1, MyData.Field2,
First(MyData.Field3) AS FirstOfField3
FROM MyData
GROUP BY MyData.Field2
ORDER BY Min(MyData.Field1);
Nov 12 '05 #3

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

Similar topics

1
by: monika | last post by:
hi ... I have an asp page which has 3 buttons. <p align="center"><input class="button" type="button" onClick="location='welStudent.asp';" value="Click to write a new story"></p> <p...
1
by: Anurag Saxena | last post by:
Dear Mr Kamath, Thanx for prompt response but Problem is still as it is,I am using registerd scrrun.dll on NT Server and IIS installed on that. When this problem came a month before my sql...
16
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In:...
0
by: Mae Lim | last post by:
Dear all, I'm newbie to XML in C#. Below it's the existing XMLDocument I need to generate using System.Xml. The <CustData> will loop thru a recordset to generate it. Example Codes :- ...
1
by: Liam.M | last post by:
HEY GUYS, need some urgent help here....I am querying my database based on a DueDate field...and want to send an automated email to anyone that falls within two months PRIOR to this "DueDate",...
5
by: mail | last post by:
Urgent help needed! I moved an application from ASP+ACCESS to ASP+MS SQLSERVER and I have the following problem: If the join on two tables results on duplicate colum names (which appear in...
2
by: tezza98 | last post by:
Hi im creating a function to insert data from a MYOB file into an Access database. what im trying to do is copy entire tables from MYOB into ACCESS. Im using a simple Access Database with so there...
4
by: musai | last post by:
I have created vb oracle application I installed oracle client in three machine. All machine was reconfigured after oracle installed I could see table and record set through sql plus sheet in...
1
by: lxxslay3rxxl | last post by:
Let's say I haf 3 project that I wan to list, each project should have 1 value assign to it, but if i remove 1 of the value for 1 of the project, and i tried to list all 3 projects, I get this error:...
6
by: muddasirmunir | last post by:
i make a form whic has one data grid and one text box and one button when i write a name on tex box and click add the name stored in database successfully. now in the grid i want to show all the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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...

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.