| SQL - Questions and Answers Have a SQL question? Post it here. First do a search to see if someone hasn't already answered it. |
|
||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
|
|||
How to union two tables, and make one "override" the other for similar records?I have a list of prices for a stocks on each day in a table. I want to make a table that can override the price for a stock on a particular day. If XYZ is $1 on 1/1/2007 according to my main price table, I might want to substitute in $2 for that day instead in my override table. Then, I'd like to union the two, with the $2 record showing as the price for that day.
|
|
|||
|
Found a solution:
SELECT MktCode,Date,Price |
|
|||
SELECT |