General information
Forum:
Microsoft SQL Server
>>Hi
>>
>>I can't remember how to do this.
>>
>>I have two tables with a join
>>
>>Table Contact has multiple rows for each row in table Individual.
>>
>>I only want to return the earliest row in table Contact for each row in Table Contact. Each row in table contact has a created date and they are joined on individual_ref
>>
>>How do I do that ?
>>
>>Thanks
>
>Some example data and desired result from it?
Ok
Table individual
Individual_ref
114817
table contact
contact_ref ORGANISATION_REF INDIVIDUAL_REF CREATE_TIMESTAMP
440490 1333 114817 2011-06-01 14:21:01.143
440491 13 114817 2011-06-01 14:21:13.477
447861 1418 114817 2011-08-24 12:17:52.810
232049 22 114817 2007-12-25 09:47:34.937
232050 1435 114817 2007-12-24 09:47:34.937
I only want to link to contact_ref 232050
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only