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

select all record starting at a null field where ever in the table

P: n/a
Hi All,

I have a table that consists of some fields like carNum, ShipDate,
ReleasedDate. I want to select all records, but i want the selection
to start where the ReleasedDate is null/empty and until end of file

table:
carNum ShipDate ReleasedDate
1 8/1/04 8/11/04
2 8/5/04 8/10/04
3 8/9/04
4 8/22/04 8/29/04
5 8/30/04 9/5/04
6 9/2/04
7 9/3/04 9/8/04

my resulting query should be:
carNum ShipDate ReleasedDate
3 8/9/04
4 8/22/04 8/29/04
5 8/30/04 9/5/04
6 9/2/04
7 9/3/04 9/8/04

Thank you all so much in advance!!
Jim
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Create a query that selects all the records from the first null date like
this:

SELECT MyTable.* FROM MyTable WHERE MyTable.carNum >=
( SELECT Min(carNum) AS MinOfCarNum FROM MyTable AS Dupe
WHERE Dupe.ReleasedDate Is Null );

You can paste that into SQL View of a query.
Then replace "MyTable" with the name of your table.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jimmy" <hu*******@yahoo.com> wrote in message
news:fc**************************@posting.google.c om...
Hi All,

I have a table that consists of some fields like carNum, ShipDate,
ReleasedDate. I want to select all records, but i want the selection
to start where the ReleasedDate is null/empty and until end of file

table:
carNum ShipDate ReleasedDate
1 8/1/04 8/11/04
2 8/5/04 8/10/04
3 8/9/04
4 8/22/04 8/29/04
5 8/30/04 9/5/04
6 9/2/04
7 9/3/04 9/8/04

my resulting query should be:
carNum ShipDate ReleasedDate
3 8/9/04
4 8/22/04 8/29/04
5 8/30/04 9/5/04
6 9/2/04
7 9/3/04 9/8/04

Thank you all so much in advance!!
Jim

Nov 13 '05 #2

P: n/a
Thank you so much Allen, it works perfect for me
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.