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.
Author |
Topic |
ajmaly
Starting Member
11 Posts |
Posted - 2010-08-01 : 12:49:21
|
TableAUID Name1 A 2 B 3 DTableBUID Name1 A 2 C Above is the 2 table..and I wrote below SQL Query to compare between two..but what wrong in below query (not working)...;with cte as (selectsum(case when exists (select 1 from TableA where TableA.UID = TableB.UIDandTableA.name <> TableB.name) then 1 else 0 end as [CountBad]from TableB)select case when CountBad > 0 then 'NO' else 'YES' end from cteajmal |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-08-01 : 13:39:05
|
There is a closing parentheses missing. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|