docs icon indicating copy to clipboard operation
docs copied to clipboard

Entity SQL rewrite... is it correct?

Open siennaA opened this issue 8 years ago • 3 comments

If I understood correctly, T-SQL expression " sal > all (select salary from employees)" be same as Entity SQL expression "not exists(select 0 from employees as e where sal > e.salary)"

Shouldn't it be "not exists(select 0 from employees as e where sal <= e.salary)" ?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

siennaA avatar May 15 '18 01:05 siennaA

@douglaslMS can you look at this question?

mairaw avatar May 15 '18 19:05 mairaw

I’ve already forwarded the question to some of my contacts, and I’m hoping to get a response soon.

edit by @mairaw: removed email template

douglaslMS avatar May 15 '18 19:05 douglaslMS

@siennaA very good catch! Yes, the condition needs to be inverted for the equivalent of ALL to be correct.

divega avatar May 15 '18 19:05 divega