Earliest Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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 <--
 
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 <--
 
=?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 <--
 
Back
Top