Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Coalesce help

Author  Topic 

Hommer
Aged Yak Warrior

808 Posts

Posted - 2013-03-04 : 17:30:22
Hi,

I have this syntax, and my question is, will it always return the first not null FK in the order from left to right?

Select col 1, col2
from tblA join tblB
on Coalesce(tblA.FK1, tblA.FK2) = tblB.Key

Thanks!

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2013-03-04 : 17:34:18
Yes.

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -