Thread View: comp.databases.ms-access
3 messages
3 total messages
Started by Peter
Mon, 30 Aug 2004 20:06
Database query, part of records
Author: Peter
Date: Mon, 30 Aug 2004 20:06
Date: Mon, 30 Aug 2004 20:06
19 lines
1414 bytes
1414 bytes
Hello! I have some records in a database (access), like this: 001111-10 001111-11 001111-12 002222-10 002222-11 002222-12 I need to retrive the first record of each sequence, "001111-10" and "002222-10" in the example above. Next part is I need to show only the first part of each record, "001111" and "002222" on an Active Server Page (ASP). Help with any part of this would be appreciated. BR/Peter
Re: Database query, part of records
Author: Jeff Cochran
Date: Mon, 30 Aug 2004 20:52
Date: Mon, 30 Aug 2004 20:52
25 lines
1707 bytes
1707 bytes
On 30 Aug 2004 13:06:33 -0700, peter@topcom.nu (Peter) wrote: >Hello! >I have some records in a database (access), like this: > >001111-10 >001111-11 >001111-12 >002222-10 >002222-11 >002222-12 > >I need to retrive the first record of each sequence, "001111-10" and >"002222-10" in the example above. > >Next part is I need to show only the first part of each record, >"001111" and "002222" on an Active Server Page (ASP). > >Help with any part of this would be appreciated. It's an ASP question, but you didn't post to any ASP groups. In fact, you hit only groups where this would be off topic. Try posting to microsoft.public.inetserver.asp.db Jeff
Re: Database query, part of records
Author: Pieter Linden
Date: Tue, 31 Aug 2004 03:13
Date: Tue, 31 Aug 2004 03:13
29 lines
1797 bytes
1797 bytes
peter@topcom.nu (Peter) wrote in message news:<f6c505b5.0408301149.6e21dbb@posting.google.com>... > Hello! > I have some records in a database (access), like this: > > 001111-10 > 001111-11 > 001111-12 > 002222-10 > 002222-11 > 002222-12 > > I need to retrive the first record of each sequence, "001111-10" and > "002222-10" in the example above. SELECT Left$([Recno],6) AS SeqNo, First(Table1.RecNo) AS FirstOfRecNo FROM Table1 GROUP BY Left$([Recno],6); > Next part is I need to show only the first part of each record, > "001111" and "002222" on an Active Server Page (ASP). SELECT Left$([Recno],6) AS SeqNo FROM Table1 GROUP BY Left$([Recno],6); > Help with any part of this would be appreciated. > > BR/Peter
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads