I have a table called CompanyLinks:
And a table called Companies:
I would like to select all rows in which updatedate is more than two days ago, with a custom column LinkName that should be:
a. If CompanyId<>-1 : Companies.companyname
b. If CompanyId==-1: SiteName
(i.e., I would like to have an inner join on condition that companyId<>-1).