By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,052 Members | 1,456 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,052 IT Pros & Developers. It's quick & easy.

Urgent Recordset problem

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
"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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.