﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server Newbies  / Which table join should I use / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 17:28:34 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Which table join should I use</title><link>http://www.sqlservercentral.com/Forums/Topic1394584-1292-1.aspx</link><description>GailWill do, thanks for the tip, don't want to get into bad habits this early</description><pubDate>Mon, 10 Dec 2012 07:14:26 GMT</pubDate><dc:creator>ron.grace</dc:creator></item><item><title>RE: Which table join should I use</title><link>http://www.sqlservercentral.com/Forums/Topic1394584-1292-1.aspx</link><description>I would recommend you get into the habit of qualifying your columns names[code="sql"]DELETE FROM DespatchWHERE Despatch.ordno NOT IN(SELECT Order.ordno FROM Order)[/code]</description><pubDate>Mon, 10 Dec 2012 07:02:45 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: Which table join should I use</title><link>http://www.sqlservercentral.com/Forums/Topic1394584-1292-1.aspx</link><description>'Simple' is best</description><pubDate>Mon, 10 Dec 2012 07:00:40 GMT</pubDate><dc:creator>ron.grace</dc:creator></item><item><title>RE: Which table join should I use</title><link>http://www.sqlservercentral.com/Forums/Topic1394584-1292-1.aspx</link><description>[quote][b]ron.grace (12/10/2012)[/b][hr]Roland,That worked a treat, many thanks, I was obviously over complicating things[/quote]LOL! I've outsmarted myself many times, I know what you mean!</description><pubDate>Mon, 10 Dec 2012 06:58:52 GMT</pubDate><dc:creator>Roland Alexander STL</dc:creator></item><item><title>RE: Which table join should I use</title><link>http://www.sqlservercentral.com/Forums/Topic1394584-1292-1.aspx</link><description>Roland,That worked a treat, many thanks, I was obviously over complicating things</description><pubDate>Mon, 10 Dec 2012 06:56:59 GMT</pubDate><dc:creator>ron.grace</dc:creator></item><item><title>RE: Which table join should I use</title><link>http://www.sqlservercentral.com/Forums/Topic1394584-1292-1.aspx</link><description>[quote][b]ron.grace (12/10/2012)[/b][hr]I've got 2 tables Order &amp; Despatch and I'm trying to add some keys to the tables. The OrderNo field is a primary key in Order and a foreign key in Despatch, but it won't let me add the key as there are obviously some records in Despatch that don't exist in Order. I now want to delete these rogue records. My first attempt was as follows but didn't work, any suggestionsdelete from Despatch(select b.ordno from Despatch bfull outer join Order aon b.ordno = a.ordnowhere a.ordno is null)[/quote][code]DELETE DespatchWHERE ordno NOT IN(SELECT ordno FROM Order)[/code]</description><pubDate>Mon, 10 Dec 2012 06:50:31 GMT</pubDate><dc:creator>Roland Alexander STL</dc:creator></item><item><title>Which table join should I use</title><link>http://www.sqlservercentral.com/Forums/Topic1394584-1292-1.aspx</link><description>I've got 2 tables Order &amp; Despatch and I'm trying to add some keys to the tables. The OrderNo field is a primary key in Order and a foreign key in Despatch, but it won't let me add the key as there are obviously some records in Despatch that don't exist in Order. I now want to delete these rogue records. My first attempt was as follows but didn't work, any suggestionsdelete from Despatch(select b.ordno from Despatch bfull outer join Order aon b.ordno = a.ordnowhere a.ordno is null)</description><pubDate>Mon, 10 Dec 2012 06:46:17 GMT</pubDate><dc:creator>ron.grace</dc:creator></item></channel></rss>