sharonsql2013 (5/18/2015)
Is it possible to join based on conditionsI am trying to join Project_Code with Manager.Code but if the project_code is blank then it should look for Project_CostCenter and Join with ManagerCode .
Project_Code = Manager.Code ( But if Project_Code is blank)
Then Project_Cost_Center = Manager.code
I tried COALESCE but somehow my results don't show as expected, also the Projectcode is blank and not Null
Please post your code so we can try to figure something else out because conditional joins typical result in some pretty slow performance and pretty high resource usage.
--Jeff Moden
Change is inevitable... Change for the better is not.