Jump to content

Recommended Posts

Posted

We're using Sql Server 2K5.

 

I have a table containing dates for an events table.* The dates table contains one or more dates for a single event.* What is the query on the dates table that returns only 1 date (the earliest date) for each event.

 

So the the dates table looks like this:

id* event_id* date

1** 37********** 2007/02/01

2** 37********** 2007/01/01

3** 38********** 2006/01/01

4** 39********** 2007/04/01

5** 39********** 2006/01/01

 

I looking for a dates table resultset of:

id* event_id* date

1** 37********** 2007/01/01

3** 38********** 2006/01/01

5** 39********** 2006/01/01

 

Notice there is only* one entry for each event_id and this date represents the earliest time for the event.

 

Thanks for the query.

 

 

More...

 

View All Our Microsoft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...