Earliest Date

P

Pass-the-reality

I have a Query that captures TestStartID,TestCastNumber and TestStartDate.
I want to pull the earliest date listed for TestStartDate that corresponds
with the TestStartID number. The name of the Query is PackageStarted. Here
is an example of the Query Data.

TestStartID TestCastNumber TestStartDate
12305 7532.001 1-1-07
12305 7532.002 1-2-07

I want a query to only show TestStartID 12305 with a 1-1-07 TestStartDate.
 
S

Stefan Hoffmann

Hmm,

Pass-the-reality said:
TestStartID TestCastNumber TestStartDate
12305 7532.001 1-1-07
12305 7532.002 1-2-07
I want a query to only show TestStartID 12305 with a 1-1-07 TestStartDate.

SELECT TestStartID, Min(TestStartDate)
FROM [yourQuery]
GROUP BY TestStartID

as SQL statement.


mfG
--> stefan <--
 
P

Pass-the-reality

I added what you said into the SQL statement and it is giving me a Snytax
error in From Clause. I used what you had " FROM [yourQuery]" and I even
tried "FROM [PackageStarted2]". PackageStarted2 is the name of the Query.
Any suggestions.

SELECT PackageStarted.[Package Numbers], PackageStarted.[Test Start ID],
PackageStarted.[Testing Started], PackageStarted.[Test Case #],
PackageStarted.[Test Start Date]
FROM PackageStarted

SELECT Test Start ID, Min(Test Start Date)
FROM [PackageStarted2]
GROUP BY Test Start ID

Stefan Hoffmann said:
Hmm,

Pass-the-reality said:
TestStartID TestCastNumber TestStartDate
12305 7532.001 1-1-07
12305 7532.002 1-2-07
I want a query to only show TestStartID 12305 with a 1-1-07 TestStartDate.

SELECT TestStartID, Min(TestStartDate)
FROM [yourQuery]
GROUP BY TestStartID

as SQL statement.


mfG
--> stefan <--
 
B

Bob Quintal

=?Utf-8?B?UGFzcy10aGUtcmVhbGl0eQ==?=
I added what you said into the SQL statement and it is giving me a
Snytax error in From Clause. I used what you had " FROM
[yourQuery]" and I even tried "FROM [PackageStarted2]".
PackageStarted2 is the name of the Query. Any suggestions.

Because you put spaces in field names, you need to delimit the field
name with []

SELECT [Test Start ID], Min([Test Start Date])
FROM [PackageStarted2]
GROUP BY [Test Start ID]

Q


SELECT PackageStarted.[Package Numbers], PackageStarted.[Test
Start ID], PackageStarted.[Testing Started], PackageStarted.[Test
Case #], PackageStarted.[Test Start Date]
FROM PackageStarted

SELECT Test Start ID, Min(Test Start Date)
FROM [PackageStarted2]
GROUP BY Test Start ID

Stefan Hoffmann said:
Hmm,

Pass-the-reality said:
TestStartID TestCastNumber TestStartDate
12305 7532.001 1-1-07
12305 7532.002 1-2-07
I want a query to only show TestStartID 12305 with a 1-1-07
TestStartDate.

SELECT TestStartID, Min(TestStartDate)
FROM [yourQuery]
GROUP BY TestStartID

as SQL statement.


mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top