 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Join for merging records</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/join-for-merging-records/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/join-for-merging-records/</link>
	<description></description>
	<lastBuildDate>Fri, 24 May 2013 17:13:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: eabouzeid</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/join-for-merging-records/#comment-79091</link>
		<dc:creator>eabouzeid</dc:creator>
		<pubDate>Mon, 12 Jul 2010 14:58:18 +0000</pubDate>
		<guid isPermaLink="false">#comment-79091</guid>
		<description><![CDATA[Thank you Carlos! This worked flawlessly.]]></description>
		<content:encoded><![CDATA[<p>Thank you Carlos! This worked flawlessly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/join-for-merging-records/#comment-79004</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Thu, 08 Jul 2010 15:47:02 +0000</pubDate>
		<guid isPermaLink="false">#comment-79004</guid>
		<description><![CDATA[If I understand correctly, and if this is a one-time operation, an easy (but probably not efficient) way to populate your new table would be creating a unique index on the serial number (if it doesn&#039;t exist) with the IGNORE_DUP_KEY option set to ON, and execute an INSERT-SELECT command from a union from your source tables.

Something like this:

&lt;pre&gt;CREATE UNIQUE INDEX yourIndex ON yourFinalTable(serial_number) WITH (IGNORE_DUP_KEY = ON)

INSERT INTO yourFinalTable
SELECT * FROM table1
UNION SELECT * FROM table2
UNION SELECT * FROM table3
...

ALTER INDEX yourIndex ON yourFinalTable SET (IGNORE_DUP_KEY = OFF)&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>If I understand correctly, and if this is a one-time operation, an easy (but probably not efficient) way to populate your new table would be creating a unique index on the serial number (if it doesn&#8217;t exist) with the IGNORE_DUP_KEY option set to ON, and execute an INSERT-SELECT command from a union from your source tables.</p>
<p>Something like this:</p>
<pre>CREATE UNIQUE INDEX yourIndex ON yourFinalTable(serial_number) WITH (IGNORE_DUP_KEY = ON)

INSERT INTO yourFinalTable
SELECT * FROM table1
UNION SELECT * FROM table2
UNION SELECT * FROM table3
...

ALTER INDEX yourIndex ON yourFinalTable SET (IGNORE_DUP_KEY = OFF)</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: eabouzeid</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/join-for-merging-records/#comment-78949</link>
		<dc:creator>eabouzeid</dc:creator>
		<pubDate>Wed, 07 Jul 2010 12:20:04 +0000</pubDate>
		<guid isPermaLink="false">#comment-78949</guid>
		<description><![CDATA[OK, maybe better if I explain practically. I have many different tables where each table represents a scan of the network that I performed gathering information about installed software on our network by computer user. Sometimes an individual may not be logged into the network to scan. I want to therefore merge all of the tables using the serial number of each computer so as to create one final table that has the results of all computers in the company but without duplicates. Thank you for your help Carlos.]]></description>
		<content:encoded><![CDATA[<p>OK, maybe better if I explain practically. I have many different tables where each table represents a scan of the network that I performed gathering information about installed software on our network by computer user. Sometimes an individual may not be logged into the network to scan. I want to therefore merge all of the tables using the serial number of each computer so as to create one final table that has the results of all computers in the company but without duplicates. Thank you for your help Carlos.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/join-for-merging-records/#comment-78780</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Thu, 01 Jul 2010 15:32:51 +0000</pubDate>
		<guid isPermaLink="false">#comment-78780</guid>
		<description><![CDATA[I&#039;m not sure I understand what you want to get as result.  Can you post some example data from your tables and the results you would want to get ?]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure I understand what you want to get as result.  Can you post some example data from your tables and the results you would want to get ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/9 queries in 0.024 seconds using memcached
Object Caching 310/313 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-24 19:18:28 -->