Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

This session focuses on exposing a number of commonly used TSQL worst practices and demonstrates the problems associated with those usages and explains the correct way of dealing with them.

TechED India 2011 - TSQL Worst Practices

01 00 not in.sql

Mar 9 2012 12:00AM by Jacob Sebastian   

Using "NOT IN" should carefully consider the possibility of NULL values, else the results will be incorrect.

Script Body
/*-----------------------------------------------------------------------------
  Date			: 23 March 2011
  SQL Version	: SQL Server 2005/2008/Denali
  Author		: Jacob Sebastian
  Email			: jacob@beyondrelational.com
  Twitter		: @jacobsebastian
  Blog			: http://beyondrelational.com/blogs/jacob
  Website		: http://beyondrelational.com

  Summary:
  This script is part of the demo presented by Jacob Sebastian during 
  Tech-ED India 2011 on "TSQL Worst Practices".

  Disclaimer:  
  THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF 
  ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED 
  TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
USE teched 
GO 
IF OBJECT_ID('target') IS NOT NULL BEGIN
	DROP TABLE target
END
GO

CREATE TABLE target (
	PostID INT, 
	Title VARCHAR(100)
)
GO

IF OBJECT_ID('source') IS NOT NULL BEGIN
	DROP TABLE source
END
GO

CREATE TABLE source (
	PostID INT, 
	Question VARCHAR(100),
)
GO

INSERT INTO source (PostID, Question) SELECT 1, 'What is denali?'
INSERT INTO source (PostID, Question) SELECT 2, 'What is Crescent?'

INSERT INTO target (PostID, Title) SELECT 1, 'What is denali?'
INSERT INTO target (PostID, Title) SELECT 3, 'What is Apollo?'
INSERT INTO target (PostID, Title) SELECT 4, 'What is Atlanta?'
INSERT INTO target (Title) SELECT 'Welcome to Silverlight'

SELECT * FROM source 
SELECT * FROM target 
4



Submit

Your Comment


Sign Up or Login to post a comment.

"01 00 not in.sql" rated 5 out of 5 by 4 readers
01 00 not in.sql , 5.0 out of 5 based on 4 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]