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)
 Join question

Author  Topic 

cipriani1984
Constraint Violating Yak Guru

304 Posts

Posted - 2011-02-02 : 10:18:19
Hi,

This is probably a silly/basic question.

But I have the following

if not exists
(
select a.a
from a inner join b on a.a = (b.a OR b.b)
)

it doesnt like it, isnt there a way to join using either or?

cipriani1984
Constraint Violating Yak Guru

304 Posts

Posted - 2011-02-02 : 10:21:46
its alright fixed it.

on a.a = b.a OR a.a = b.b

quote:
Originally posted by cipriani1984

Hi,

This is probably a silly/basic question.

But I have the following

if not exists
(
select a.a
from a inner join b on a.a = (b.a OR b.b)
)

it doesnt like it, isnt there a way to join using either or?

Go to Top of Page
   

- Advertisement -