Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

How to remove this if not exists condition and how to print the result set same without if condition

$
0
0

How to remove this if not exists condition and how to print the result set same without if condition. The result set should be same as it behave with if not exists condition 

IF NOT exists(select 1 from External_Blk_Itm_Contracts E
INNER JOIN BUDTERMINALS BT ON BT.MBFTERMINALNAME = E.TerminalName AND E.ContractName = '00-000'
Inner join BudCustomers BCu on BCu.LegalName = E.CustomerName
INNEr JOIN BUDCONTRACTS BC ON BC.CUSTOMERID = bcu.CustomerID
AND bc.TERMINALID = bt.TERMINALID)


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>