Jump to content

Question about queries


EchoFool

Recommended Posts

Hey, quick question..

 

 

Said i have rows with time stamps... now rows can have an ID but many can have the same if they are related to the same thing.

So what i want to do is get one of each record ID which is the youngest. How would i go about doing something like that?

 

Example:

 

1)Record  3 - 12/04/04

2)Record 3 - 12/04/05

3)Record 4 - 12/04/05

 

So the two that it will return is :

Record 3  (The second one in the list)

Record 4 as this is different entirely to the record 3's.

Link to comment
Share on other sites

RecordID is the ID of the forum thread.

 

The list above would represent the posts in the thread so :

 

 

RecordID |  Text  |  posted on  |  PrimaryID |

  3          |  test  |  12/04/04  |    23232 |

 

So its not uncommon that there will be two of the RecordID but the query is needing to find the "youngest" by finding the youngest "posted on" time stamp.. the above is just an example of my idea.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.