do you mean like this....declare @tblBestBidsForToday table ( Security_ID int,source_code varchar(20), Best_Bid float, Import_Date datetime)declare @tblBestAsksForToday table ( Security_ID int, source_code varchar(20), Best_Ask float, Import_Date datetime)insert into @tblBestBidsForTodayselect 125, 'TR73', 112.6250, '2007-11-28 07:23:00' union allselect 125, 'TTFN03', 112.8750, '2007-11-28 07:25:00' union allselect 125, 'TTFN03', 112.8750, '2007-11-28 07:27:00' union allselect 125, 'TTFN03', 112.8750, '2007-11-28 07:29:00' union allselect 125, 'GFI01', 112.9370, '2007-11-28 07:31:00' union allselect 125, 'GFI01', 112.9370, '2007-11-28 07:33:00'insert into @tblBestAsksForTodayselect 125, 'GFI01', 113.1250, '2007-11-28 07:29:00' union allselect 125, 'GFI01', 113.0620, '2007-11-28 07:31:00' union allselect 125, 'GFI01', 113.0620, '2007-11-28 07:33:00' union allselect 125, 'GFI01', 113.0620, '2007-11-28 07:35:00' union allselect 125, 'GFI01', 113.0620, '2007-11-28 07:39:00' union allselect 125, 'GFI01', 113.0620, '2007-11-28 07:41:00'selectcoalesce(b.Security_ID,a.security_id),coalesce(b.Source_Code,a.source_code),b.Best_Bid,a.Best_Ask,coalesce(b.Import_Date,a.import_date)from @tblBestBidsForToday bfull join @tblBestAsksForToday a on b.Security_ID = a.Security_IDand b.Source_Code = a.Source_Codeand b.Import_Date = a.Import_Date
Em