Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 tables

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-10-23 : 07:41:48
Rick writes "I have for tables, Migrant table, Interdiction table, Val_Disposition table, Val_Country table. Table structures are as follows:



Migrant Interdiction Val_Disposition Val_Country



Migrant_ID (PK) Migrant_ID Disposition_Code (PK) Country_Code (PK)

Family_ID Interdiction_Date Description Country_Name

Head_Of_Family Interview_Date Comment_Required

Last_Name APSO_Name

First_Name Disposition_Code

Middle_Name

Date_Of_Birth

Country_Code

City_Of-Origin



Here’s what I need to extract: First_Name, Last_Name, Middle_Name, Date_Of_Birth, Country_Name, City_Of_Origin, LAST Interdiction_Date, Disposition, APSO_Name.



Note: The interdiction table has multiple entries and what I need is the most current interdiction_Date with associated data.



Any help is appreciated!"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-23 : 07:49:37
Learn SQL

http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp

Also read about Max function in sql server help file

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-23 : 07:50:24
Use MAX function.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -