I have 3 tables with the following relevant fields:
ItemsFrmManufac turer
Date......Seria lNum.....Descri ption.....Statu s
01012010..00000 1..... Item1..... IN
01022010..00000 2..... Item1..... IN
ItemsShipped
Date......Seria lNum.....Descri ption.....Statu s
06012010..00000 1..... Item1..... OUT
06012010..00000 3..... Item2..... OUT
07152010..00000 1..... Item1..... OUT
ItemsFromCustom erRepair
Date......Seria lNum.....Descri ption.....Statu s
05012010..00004 ..... Item3..... IN
06302010..00001 ..... Item1..... IN
I need to make a query or table takes the data from teh three tables and combines them into one table with the most recent record for each serial number.
CurrentStatus
Date......Seria lNum.....Descri ption.....Statu s
07152010..00000 1..... Item1..... OUT
01022010..00000 2..... Item1..... IN
06012010..00000 3..... Item2..... OUT
05012010..00000 4..... Item3..... IN
Any help with a sql statement to do this would be greatly appreciated.
ItemsFrmManufac turer
Date......Seria lNum.....Descri ption.....Statu s
01012010..00000 1..... Item1..... IN
01022010..00000 2..... Item1..... IN
ItemsShipped
Date......Seria lNum.....Descri ption.....Statu s
06012010..00000 1..... Item1..... OUT
06012010..00000 3..... Item2..... OUT
07152010..00000 1..... Item1..... OUT
ItemsFromCustom erRepair
Date......Seria lNum.....Descri ption.....Statu s
05012010..00004 ..... Item3..... IN
06302010..00001 ..... Item1..... IN
I need to make a query or table takes the data from teh three tables and combines them into one table with the most recent record for each serial number.
CurrentStatus
Date......Seria lNum.....Descri ption.....Statu s
07152010..00000 1..... Item1..... OUT
01022010..00000 2..... Item1..... IN
06012010..00000 3..... Item2..... OUT
05012010..00000 4..... Item3..... IN
Any help with a sql statement to do this would be greatly appreciated.
Comment