Monday, May 6, 2013

case in join

I suggest to use UNION ALL statement instead, e.g.


select * from TableA t1 inner join TableB t2 on t1.c1 = t2.c1 where 'Something' = 'Something'


UNION ALL


select * from TableA t1 inner join TableB t2 on t1.c1 = t2.c2 where 'Something' <> 'Something '




For every expert, there is an equal and opposite expert. - Becker's Law





My blog


No comments:

Post a Comment