View Single Post
  #3 (permalink)  
Old 01-04-2007, 04:44 AM
Dimitar
 
Posts: n/a
Default SQL 92 answer. Re: How to union two tables, and make one "override" the other for similar records?

[sql]
select
distinct t1.mktcode, t1.date, case when t2.mktcode is null then t1.price else t2.price end
from
tblstockprices t1
left join tbloverrideprices t2 on t1.mktcode=t2.mktcode and t1.date=t2.date

[/sql]
Edit/Delete Message Reply With Quote