Declare @memid as varchar(13)
set @memid = 'QH23455909187';
WITH MEM_CTE AS
FROM tbl01 EK WITH(NOLOCK)
INNER JOIN dbo.tbl02 p WITH(NOLOCK) ON ek.someid = p.someid
INNER JOIN dbo.tbl03 eo WITH(NOLOCK) ON ek.someid = eo.someid
WHERE blah blah.....
IF NOT EXISTS
(SELECT DISTINCT mem.[memid]
FROM MEM_CTE mem
LEFT JOIN tbl04 ag ON mem.someid = ag.someid
WHERE blah blah ...
PRINT 'Member is NOT not listed' + CHAR(13)
Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied?
You can use SQL Server Initialize from Backup…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…