I am using SQL Server 2012.
I have 2 tables, tblA and tblB that have the same columns with different data. Both have columns Symbol and Name.
I also have another table, tblC that has a column Symbol.
In a View (not stored procedure), I need to query tblC with tblA (join at column Symbol) where symbol = 'ABC', but if the Symbol 'ABC' doesn't exist in tblA, then query tblB with tblA (also join at column Symbol) where symbol = 'ABC'.
How can I do that ?
Thank you.