<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>youdidwhatwithtsql.com &#187; Software</title>
	<atom:link href="http://www.youdidwhatwithtsql.com/category/software/feed" rel="self" type="application/rss+xml" />
	<link>http://www.youdidwhatwithtsql.com</link>
	<description>making DBAs everywhere curse!</description>
	<lastBuildDate>Tue, 31 Jan 2012 12:21:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Tweet-SQL 3.5 Released</title>
		<link>http://www.youdidwhatwithtsql.com/tweet-sql-3-5-released/1352</link>
		<comments>http://www.youdidwhatwithtsql.com/tweet-sql-3-5-released/1352#comments</comments>
		<pubDate>Tue, 06 Sep 2011 21:25:43 +0000</pubDate>
		<dc:creator>Rhys</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tweet-SQL]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[Twitter API]]></category>
		<category><![CDATA[Twitter App]]></category>

		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/tweet-sql-3-5-released/1352</guid>
		<description><![CDATA[Tweet-SQL 3.5 is now available. This release features better methods for using multiple Twitter accounts and https support. Download your copy over on tweet-sql.com. There&#8217;s a few exciting blog posts coming up including &#34;The AdventureWorks of Tweet-SQL&#34; and &#34;Twitter bots with Tweet-SQL&#34;. In the meantime checkout the following blog posts&#8230; MULTIPLE TWITTER ACCOUNTS WITH TWEET-SQL [...]<p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/tweet-sql-3-5-released/1352">Tweet-SQL 3.5 Released</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a title="Tweet-SQL" href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a> 3.5 is now available. This release features better methods for using multiple Twitter accounts and https support. Download your copy over on <a href="http://www.tweet-sql.com/dl.php">tweet-sql.com</a>.</p>
<p>There&#8217;s a few exciting blog posts coming up including <em>&quot;The AdventureWorks of Tweet-SQL&quot; </em>and <font color="#666666"><em>&quot;Twitter bots with Tweet-SQL&quot;. </em></font>In the meantime checkout the following blog posts&#8230;</p>
<h4><font style="font-weight: normal" size="2"><a title="Multiple Twitter account support in Tweet-SQL" href="http://www.youdidwhatwithtsql.com/multiple-twitter-accounts-with-tweet-sql/1082" target="_blank">MULTIPLE TWITTER ACCOUNTS WITH TWEET-SQL</a></font></h4>
<h4><font   2??="2??"><a title="Guide to the oAuth workflow in Tweet-SQL" href="http://www.youdidwhatwithtsql.com/configuring-oauth-for-tweet-sql/814"><font style="font-weight: normal" size="2">CONFIGURING OAUTH FOR TWEET-SQL</font></a></font></h4>
<h4><font style="font-weight: normal" size="2"><a title="It&#39;s fun creating lists with Tweet-SQL" href="http://www.youdidwhatwithtsql.com/creating-a-sqlserverpedia-list-with-tweet-sql/835">CREATING A SQLSERVERPEDIA LIST WITH TWEET-SQL</a></font></h4>
<p><map name='google_ad_map_1352_a45beff5d2e172f6'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/1352?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_1352_a45beff5d2e172f6' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=1352&amp;url=http%3A%2F%2Fwww.youdidwhatwithtsql.com%2Ftweet-sql-3-5-released%2F1352' title="Tweet SQL 3.5 Released" alt=" Tweet SQL 3.5 Released" /></p><p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/tweet-sql-3-5-released/1352">Tweet-SQL 3.5 Released</a></p>
<div class="none"><div class="g-plusone" data-href="http://www.youdidwhatwithtsql.com/tweet-sql-3-5-released/1352" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.youdidwhatwithtsql.com/tweet-sql-3-5-released/1352/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple Twitter accounts with Tweet-SQL</title>
		<link>http://www.youdidwhatwithtsql.com/multiple-twitter-accounts-with-tweet-sql/1082</link>
		<comments>http://www.youdidwhatwithtsql.com/multiple-twitter-accounts-with-tweet-sql/1082#comments</comments>
		<pubDate>Wed, 04 May 2011 20:13:01 +0000</pubDate>
		<dc:creator>Rhys</dc:creator>
				<category><![CDATA[Tweet-SQL]]></category>
		<category><![CDATA[oAuth]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/multiple-twitter-accounts-with-tweet-sql/1082</guid>
		<description><![CDATA[Since Twitter made the switch to use oAuth the single most requested feature for Tweet-SQL has been for better handling of multiple twitter accounts. While it was possible to use multiple accounts, with no restriction, you had to go through the oAuth process every time you wanted to change usernames. Obviously this won&#8217;t do so [...]<p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/multiple-twitter-accounts-with-tweet-sql/1082">Multiple Twitter accounts with Tweet-SQL</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Since <a href="http://twitter.com" target="_blank">Twitter</a> made the switch to use <a href="http://oauth.net" target="_blank">oAuth</a> the single most requested feature for <a title="Tweet-SQL - Twitter app for SQL Server" href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a> has been for better handling of multiple twitter accounts. While it was possible to use multiple accounts, with no restriction, you had to go through the oAuth process every time you wanted to change usernames. Obviously this won&#8217;t do so I&#8217;ve improved this in the next version of <a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a>.</p>
<p>Firstly, assuming you&#8217;ve already gone through the <a title="Tweet-SQL - How to use oAuth" href="http://www.youdidwhatwithtsql.com/configuring-oauth-for-tweet-sql/814" target="_blank">oAuth process for Tweet-SQL</a> once we need to copy the current active account. Just run the below TSQL in <a href="http://en.wikipedia.org/wiki/SQL_Server_Management_Studio" target="_blank">SSMS</a> against the database you have installed the software in.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1082code8'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p10828"><td class="code" id="p1082code8"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_cfg_copy_oauth_account</span>;</pre></td></tr></table></div>

<p>This will copy the Twitter account details from the registry to a table called <strong>dbo.tweet_oauth_accounts</strong>. This account remains active for Tweet-SQL.</p>
<p>Next we need to authorise the additional account with the Tweet-SQL configuration program. Launch the tool, change the <strong>username </strong>field to the new account screen name, click File &gt; Save Config.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2011/Multiple-Twitter-accounts-with-Tweet-SQL_11F86/tweet-sql_configuration_program.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="tweet-sql_configuration_program" border="0" alt="tweet sql configuration program thumb Multiple Twitter accounts with Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2011/Multiple-Twitter-accounts-with-Tweet-SQL_11F86/tweet-sql_configuration_program_thumb.png" width="420" height="484" /></a></p>
<p align="left">Click oAuth &gt; Get Access Token to begin the oAuth process. The following dialog will appear. Click &#8216;Yes&#8217;. Provided you have executed the <strong>dbo.tweet_cfg_copy_oauth_account</strong> procedure the old account details will be saved.</p>
<p align="left"><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2011/Multiple-Twitter-accounts-with-Tweet-SQL_11F86/tweet-sql_popup_dialog.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="tweet-sql_popup_dialog" border="0" alt="tweet sql popup dialog thumb Multiple Twitter accounts with Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2011/Multiple-Twitter-accounts-with-Tweet-SQL_11F86/tweet-sql_popup_dialog_thumb.png" width="644" height="229" /></a></p>
<p>In a few moments your browser will launch and you will be prompted to login to Twitter. Login with the appropriate account, authorise <a title="Tweet-SQL - Export twitter data to SQL Server" href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a> and copy the pin.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2011/Multiple-Twitter-accounts-with-Tweet-SQL_11F86/twitter_oauth_pin.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="twitter_oauth_pin" border="0" alt="twitter oauth pin thumb Multiple Twitter accounts with Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2011/Multiple-Twitter-accounts-with-Tweet-SQL_11F86/twitter_oauth_pin_thumb.png" width="644" height="304" /></a></p>
<p>Return to the Tweet-SQL configuration program and paste the pin into the dialog box.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2011/Multiple-Twitter-accounts-with-Tweet-SQL_11F86/tweet-sql_oauth_pin_dialog.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="tweet-sql_oauth_pin_dialog" border="0" alt="tweet sql oauth pin dialog thumb Multiple Twitter accounts with Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2011/Multiple-Twitter-accounts-with-Tweet-SQL_11F86/tweet-sql_oauth_pin_dialog_thumb.png" width="644" height="184" /></a></p>
<p>Click &#8216;OK&#8217; and a success dialog should appear.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2011/Multiple-Twitter-accounts-with-Tweet-SQL_11F86/tweet-sql_oauth_successful.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="tweet-sql_oauth_successful" border="0" alt="tweet sql oauth successful thumb Multiple Twitter accounts with Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2011/Multiple-Twitter-accounts-with-Tweet-SQL_11F86/tweet-sql_oauth_successful_thumb.png" width="417" height="484" /></a></p>
<p>Return to SSMS and run the below TSQL to add the new account to the <strong>dbo.tweet_oauth_accounts</strong> table</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1082code9'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p10829"><td class="code" id="p1082code9"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_cfg_copy_oauth_account</span>;</pre></td></tr></table></div>

<p>Now you should have two accounts available for <a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a>.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1082code10'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p108210"><td class="code" id="p1082code10"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> twitter_username 
<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">tweet_oauth_accounts</span>;</pre></td></tr></table></div>

<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2011/Multiple-Twitter-accounts-with-Tweet-SQL_11F86/tweet-sql_oauth_two_accounts.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="tweet-sql_oauth_two_accounts" border="0" alt="tweet sql oauth two accounts thumb Multiple Twitter accounts with Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2011/Multiple-Twitter-accounts-with-Tweet-SQL_11F86/tweet-sql_oauth_two_accounts_thumb.png" width="244" height="120" /></a></p>
<p>To select a particular twitter account we run&#8230;.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1082code11'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p108211"><td class="code" id="p1082code11"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_cfg_change_oauth_account</span> <span style="color: #FF0000;">'rhyscampbell'</span>;</pre></td></tr></table></div>

<p>Then we can post a status from this account;</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1082code12'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p108212"><td class="code" id="p1082code12"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_sts_update</span> <span style="color: #FF0000;">'Sending a test status...'</span>, null;</pre></td></tr></table></div>

<p>Then to change accounts&#8230;</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1082code13'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p108213"><td class="code" id="p1082code13"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_cfg_change_oauth_account</span> <span style="color: #FF0000;">'tweetsql'</span>;
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_sts_update</span> <span style="color: #FF0000;">'Testing the new multiple account support for oAuth in Tweet-SQL.'</span>, null;</pre></td></tr></table></div>

<p>Change back once more&#8230;</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1082code14'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p108214"><td class="code" id="p1082code14"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_cfg_change_oauth_account</span> <span style="color: #FF0000;">'rhyscampbell'</span>;
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_sts_update</span> <span style="color: #FF0000;">'Sending another test status...!'</span>, null;</pre></td></tr></table></div>

<p>That&#8217;s it! There&#8217;s no limits to the number of accounts this method will support, 2 or 2, 000! The next version of <a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a> will be released in the coming weeks. In the meantime have some fun with the <a title="Tweet-SQL download Page" href="http://www.tweet-sql.com/dl.php" target="_blank">current version</a>.</p>
<p><map name='google_ad_map_1082_a45beff5d2e172f6'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/1082?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_1082_a45beff5d2e172f6' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=1082&amp;url=http%3A%2F%2Fwww.youdidwhatwithtsql.com%2Fmultiple-twitter-accounts-with-tweet-sql%2F1082' title="Multiple Twitter accounts with Tweet SQL" alt=" Multiple Twitter accounts with Tweet SQL" /></p><p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/multiple-twitter-accounts-with-tweet-sql/1082">Multiple Twitter accounts with Tweet-SQL</a></p>
<div class="none"><div class="g-plusone" data-href="http://www.youdidwhatwithtsql.com/multiple-twitter-accounts-with-tweet-sql/1082" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.youdidwhatwithtsql.com/multiple-twitter-accounts-with-tweet-sql/1082/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tweet-SQL: Storing searches in a table</title>
		<link>http://www.youdidwhatwithtsql.com/tweet-sql-storing-searches-in-a-table/888</link>
		<comments>http://www.youdidwhatwithtsql.com/tweet-sql-storing-searches-in-a-table/888#comments</comments>
		<pubDate>Sat, 23 Oct 2010 15:05:28 +0000</pubDate>
		<dc:creator>Rhys</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tweet-SQL]]></category>
		<category><![CDATA[Twitter search]]></category>

		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/tweet-sql-storing-searches-in-a-table/888</guid>
		<description><![CDATA[A Tweet-SQL user emailed me recently about how to store results from the tweet_src_search procedure in a table. Twitter returns an atom feed for search requests so you have to handle this slightly differently compared to other Tweet-SQL procedures. Here’s a quick walk-through of how we can get Twitter search results into a database table [...]<p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/tweet-sql-storing-searches-in-a-table/888">Tweet-SQL: Storing searches in a table</a></p>
]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a> user emailed me recently about how to store results from the tweet_src_search procedure in a table. <a href="http://twitter.com" target="_blank">Twitter</a> returns an <a href="http://search.cpan.org/~miyagawa/XML-Atom-0.37/lib/XML/Atom.pm" target="_blank">atom</a> feed for search requests so you have to handle this slightly differently compared to other <a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a> procedures. </p>
<p>Here’s a quick walk-through of how we can get Twitter search results into a database table using <a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a>. First create a table to hold the tweets.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p888code18'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p88818"><td class="code" id="p888code18"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">TABLE</span> dbo.<span style="color: #202020;">TwitterSearchResults</span>
<span style="color: #808080;">&#40;</span>
	Id <span style="color: #0000FF;">INTEGER</span> <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span> <span style="color: #0000FF;">IDENTITY</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1</span>,<span style="color: #000;">1</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">PRIMARY</span> <span style="color: #0000FF;">KEY</span> <span style="color: #0000FF;">CLUSTERED</span>,
	twitter_id <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">100</span><span style="color: #808080;">&#41;</span>,
	published <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">30</span><span style="color: #808080;">&#41;</span>,
	title <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">160</span><span style="color: #808080;">&#41;</span>,
	content <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">160</span><span style="color: #808080;">&#41;</span>,
	updated <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">30</span><span style="color: #808080;">&#41;</span>,
	author_name <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">50</span><span style="color: #808080;">&#41;</span>,
	uri <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">100</span><span style="color: #808080;">&#41;</span>,
	keyword_searched <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">100</span><span style="color: #808080;">&#41;</span>
<span style="color: #808080;">&#41;</span>;</pre></td></tr></table></div>

<p>Now we can run the below script to use <a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a> to store twitter search results in the above table. Just change the value set for <strong>@keyword</strong>.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p888code19'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p88819"><td class="code" id="p888code19"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">DECLARE</span> @xml XML,
        @handle <span style="color: #0000FF;">INT</span>,
        @keyword <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">100</span><span style="color: #808080;">&#41;</span>;
&nbsp;
<span style="color: #008080;">-- Set keyword to search for</span>
<span style="color: #0000FF;">SET</span> @keyword <span style="color: #808080;">=</span> <span style="color: #FF0000;">'Obama'</span>
&nbsp;
<span style="color: #008080;">-- Turn off resultset from Tweet-SQL</span>
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_cfg_resultset_send</span> <span style="color: #000;">0</span>;
&nbsp;
<span style="color: #008080;">-- Peform a twitter search</span>
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_src_search</span> @keyword, null, @xml <span style="color: #0000FF;">OUTPUT</span>;
&nbsp;
<span style="color: #008080;">-- Prepare an xml document</span>
<span style="color: #0000FF;">EXEC</span> <span style="color: #AF0000;">sp_xml_preparedocument</span> @handle <span style="color: #0000FF;">OUTPUT</span>, @xml, <span style="color: #FF0000;">'&lt;root xmlns:a=&quot;http://www.w3.org/2005/Atom&quot; /&gt;'</span>;
&nbsp;
&nbsp;
<span style="color: #0000FF;">INSERT</span> <span style="color: #0000FF;">INTO</span> dbo.<span style="color: #202020;">TwitterSearchResults</span>
<span style="color: #808080;">&#40;</span>
	twitter_id,
	published,
	title,
	content,
	updated,
	author_name,
	uri,
	keyword_searched
<span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">&#91;</span>a:id<span style="color: #808080;">&#93;</span>,
	   <span style="color: #808080;">&#91;</span>a:published<span style="color: #808080;">&#93;</span>,
	   <span style="color: #808080;">&#91;</span>a:title<span style="color: #808080;">&#93;</span>,
	   <span style="color: #808080;">&#91;</span>a:content<span style="color: #808080;">&#93;</span>,
	   <span style="color: #808080;">&#91;</span>a:updated<span style="color: #808080;">&#93;</span>,
	   <span style="color: #808080;">&#91;</span>author_name<span style="color: #808080;">&#93;</span>,
	   <span style="color: #808080;">&#91;</span>uri<span style="color: #808080;">&#93;</span>,
	   @keyword <span style="color: #008080;">-- Store the keyword associated with this search</span>
<span style="color: #0000FF;">FROM</span> <span style="color: #0000FF;">OPENXML</span> <span style="color: #808080;">&#40;</span>@handle, <span style="color: #FF0000;">'//a:feed/a:entry'</span>, <span style="color: #000;">2</span><span style="color: #808080;">&#41;</span> <span style="color: #008080;">-- Path to tweets in the xml docs</span>
<span style="color: #0000FF;">WITH</span>
<span style="color: #808080;">&#40;</span>
	<span style="color: #808080;">&#91;</span>a:id<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">160</span><span style="color: #808080;">&#41;</span>,
	<span style="color: #808080;">&#91;</span>a:published<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">160</span><span style="color: #808080;">&#41;</span>,
	<span style="color: #808080;">&#91;</span>a:title<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">160</span><span style="color: #808080;">&#41;</span>,
	<span style="color: #808080;">&#91;</span>a:content<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">160</span><span style="color: #808080;">&#41;</span>,
	<span style="color: #808080;">&#91;</span>a:updated<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">160</span><span style="color: #808080;">&#41;</span>,
	author_name <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">100</span><span style="color: #808080;">&#41;</span> <span style="color: #FF0000;">'a:author/a:name'</span>, <span style="color: #008080;">-- Query further down the xml doc to get author info</span>
	uri <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">100</span><span style="color: #808080;">&#41;</span> <span style="color: #FF0000;">'a:author/a:uri'</span>
 <span style="color: #808080;">&#41;</span>;
&nbsp;
<span style="color: #008080;">-- Clean up            </span>
<span style="color: #0000FF;">EXECUTE</span> <span style="color: #AF0000;">sp_xml_removedocument</span> @handle;
&nbsp;
<span style="color: #008080;">-- Turn on resultset from Tweet-SQL</span>
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_cfg_resultset_send</span> <span style="color: #000;">1</span>;</pre></td></tr></table></div>

<p>Now the TwitterSearchResults table should contain and bunch of tweets.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p888code20'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p88820"><td class="code" id="p888code20"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span> 
<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">TwitterSearchResults</span>;</pre></td></tr></table></div>

<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/10/tweetsql_twitter_search_results.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="tweet-sql twitter search results" border="0" alt="tweetsql twitter search results thumb Tweet SQL: Storing searches in a table" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/10/tweetsql_twitter_search_results_thumb.png" width="644" height="197" /></a> </p>
</p>
<p>Get yourself a copy of <a href="http://www.tweet-sql.com/dl.php" target="_blank">Tweet-SQL</a> and try this out now!</p>
<p><map name='google_ad_map_888_a45beff5d2e172f6'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/888?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_888_a45beff5d2e172f6' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=888&amp;url=http%3A%2F%2Fwww.youdidwhatwithtsql.com%2Ftweet-sql-storing-searches-in-a-table%2F888' title="Tweet SQL: Storing searches in a table" alt=" Tweet SQL: Storing searches in a table" /></p><p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/tweet-sql-storing-searches-in-a-table/888">Tweet-SQL: Storing searches in a table</a></p>
<div class="none"><div class="g-plusone" data-href="http://www.youdidwhatwithtsql.com/tweet-sql-storing-searches-in-a-table/888" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.youdidwhatwithtsql.com/tweet-sql-storing-searches-in-a-table/888/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tweet-SQL Version 3 released</title>
		<link>http://www.youdidwhatwithtsql.com/tweet-sql-version-3-released/850</link>
		<comments>http://www.youdidwhatwithtsql.com/tweet-sql-version-3-released/850#comments</comments>
		<pubDate>Sat, 07 Aug 2010 19:23:51 +0000</pubDate>
		<dc:creator>Rhys</dc:creator>
				<category><![CDATA[Tweet-SQL]]></category>

		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/tweet-sql-version-3-released/850</guid>
		<description><![CDATA[Tweet-SQL version 3 has been released! Here’s a quick summary of the new features. Full 64 bit OS Support. (Previously the installer would fail to created the required registry keys on 64 bit Operating Systems). Full support for oAuth authentication. Support for the new Twitter List methods. See sqlserverpedia list with Tweet-SQL for this in [...]<p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/tweet-sql-version-3-released/850">Tweet-SQL Version 3 released</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a> version 3 has been released! Here’s a quick summary of the new features.</p>
<ul>
<li>Full 64 bit OS Support. (Previously the installer would fail to created the required registry keys on 64 bit Operating Systems).</li>
<li>Full support for <a href="http://www.youdidwhatwithtsql.com/configuring-oauth-for-tweet-sql/814" target="_blank">oAuth authentication</a>.</li>
<li>Support for the new Twitter List methods. See <a href="http://www.youdidwhatwithtsql.com/creating-a-sqlserverpedia-list-with-tweet-sql/835" target="_blank">sqlserverpedia list with Tweet-SQL</a> for this in action.</li>
<li>Support for geo-tagging of status updates.</li>
<li>Support for the Twitter reweet methods.</li>
<li>Support for the saved search API methods.</li>
<li>Support for the suggested users API methods.</li>
<li>Support for <a href="http://tinyurl.com" target="_blank">TinyURL</a>, <a href="http://tweetshrink.com/" target="_blank">TweetShrink</a> and <a href="http://twittercounter.com/" target="_blank">TwitterCounter</a>.</li>
</ul>
<p>I’ll be following up with a few cool blog posts showing what you can do with these new features. In the meantime checkout the <a href="http://www.tweet-sql.com/files/Tweet-SQL%20User%20Documentation.pdf" target="_blank">Tweet-SQL User Documentation</a> for more details and download <a href="http://www.tweet-sql.com/download.php" target="_blank">Tweet-SQL Version 3</a> now!</p>
<p><map name='google_ad_map_850_a45beff5d2e172f6'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/850?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_850_a45beff5d2e172f6' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=850&amp;url=http%3A%2F%2Fwww.youdidwhatwithtsql.com%2Ftweet-sql-version-3-released%2F850' title="Tweet SQL Version 3 released" alt=" Tweet SQL Version 3 released" /></p><p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/tweet-sql-version-3-released/850">Tweet-SQL Version 3 released</a></p>
<div class="none"><div class="g-plusone" data-href="http://www.youdidwhatwithtsql.com/tweet-sql-version-3-released/850" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.youdidwhatwithtsql.com/tweet-sql-version-3-released/850/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a sqlserverpedia list with Tweet-SQL</title>
		<link>http://www.youdidwhatwithtsql.com/creating-a-sqlserverpedia-list-with-tweet-sql/835</link>
		<comments>http://www.youdidwhatwithtsql.com/creating-a-sqlserverpedia-list-with-tweet-sql/835#comments</comments>
		<pubDate>Sat, 24 Jul 2010 16:24:20 +0000</pubDate>
		<dc:creator>Rhys</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tweet-SQL]]></category>

		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/creating-a-sqlserverpedia-list-with-tweet-sql/835</guid>
		<description><![CDATA[Many moons ago I posted an article illustrating how to befriend twitter users on the sqlserverpedia list with Tweet-SQL. Since Twitter have added various list methods to their API I thought it would be fun to rehash this post to create a list with Tweet-SQL. First copy the list of users from the sqlserverpedia page. [...]<p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/creating-a-sqlserverpedia-list-with-tweet-sql/835">Creating a sqlserverpedia list with Tweet-SQL</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Many moons ago I posted an article illustrating how to befriend twitter users on the <a href="http://sqlclrnews.blogspot.com/2009/01/befriend-twitter-users-on.html" target="_blank">sqlserverpedia list</a> with <a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a>. Since <a href="http://twitter.com" target="_blank">Twitter</a> have added various list methods to their <a href="http://apiwiki.twitter.com/Twitter-API-Documentation" target="_blank">API</a> I thought it would be fun to rehash this post to create a list with <span style="color: #666666;"><a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a>. </span></p>
<p><span style="color: #666666;">First copy the list of users from the <a href="http://sqlserverpedia.com/wiki/Twitter" target="_blank">sqlserverpedia page</a>.</span></p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/07/copy_sqlserverpedia_list.png"><img style="display: inline; border-width: 0px;" title="copy sqlserverpedia list" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/07/copy_sqlserverpedia_list_thumb.png" border="0" alt="copy sqlserverpedia list thumb Creating a sqlserverpedia list with Tweet SQL" width="644" height="449" /></a></p>
<p>Paste this into Excel and you should get something looking like below.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/07/sqlserverpedia_excel_list.png"><img style="display: inline; border-width: 0px;" title="sqlserverpedia_excel_list" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/07/sqlserverpedia_excel_list_thumb.png" border="0" alt="sqlserverpedia excel list thumb Creating a sqlserverpedia list with Tweet SQL" width="387" height="484" /></a></p>
<p>Remove the section titles, empty rows and any text after the url so we are just left with a list of Twitter profile pages.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/07/excel_sqlserverpedia_users.png"><img style="display: inline; border-width: 0px;" title="sqlserverpedia users in excel" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/07/excel_sqlserverpedia_users_thumb.png" border="0" alt="excel sqlserverpedia users thumb Creating a sqlserverpedia list with Tweet SQL" width="376" height="484" /></a></p>
<p>Next we need to extract the Twitter username from the url. This little bit of Excel wizardry should do it.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p835code26'); return false;">View Code</a> VBA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p83526"><td class="code" id="p835code26"><pre class="vba" style="font-family:monospace;">=MID(A1,SEARCH(&quot;http://twitter.com/&quot;,A1)+19, LEN(A1) - 19)</pre></td></tr></table></div>

<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/07/excel__formula_sqlserverpedia.png"><img style="display: inline; border-width: 0px;" title="excel_ formula to extract sqlserverpedia list" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/07/excel__formula_sqlserverpedia_thumb.png" border="0" alt="excel  formula sqlserverpedia thumb Creating a sqlserverpedia list with Tweet SQL" width="408" height="484" /></a></p>
<p>This formula may break as the page changes in the future so watch out for this. Review the list and remove any invalid values. At the time of writing there’s one of the list that doesn’t contain a twitter url. Save this as a csv and then import it into a database containing the <a href="http://www.tweet-sql.com/features.php" target="_blank">Tweet-SQL Procedures</a>. I’ve uploaded a copy of the file I produced today <a href="http://www.tweet-sql.com/files/sqlserverpedia_users_20100724.csv" target="_blank">here</a>. This file contains 261 Twitter users. I used the below table structure.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p835code27'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p83527"><td class="code" id="p835code27"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">USE</span> <span style="color: #808080;">&#91;</span>TweetSQLV3<span style="color: #808080;">&#93;</span>
GO
&nbsp;
<span style="color: #008080;">/****** Object:  Table [dbo].[sqlserverpedia]    Script Date: 07/24/2010 16:16:24 ******/</span>
<span style="color: #0000FF;">SET</span> ANSI_<span style="color: #808080;">NULL</span>S <span style="color: #0000FF;">ON</span>
GO
&nbsp;
<span style="color: #0000FF;">SET</span> QUOTED_IDENTIFIER <span style="color: #0000FF;">ON</span>
GO
&nbsp;
<span style="color: #0000FF;">SET</span> ANSI_PADD<span style="color: #808080;">IN</span>G <span style="color: #0000FF;">ON</span>
GO
&nbsp;
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">TABLE</span> <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>sqlserverpedia<span style="color: #808080;">&#93;</span><span style="color: #808080;">&#40;</span>
	<span style="color: #808080;">&#91;</span>url<span style="color: #808080;">&#93;</span> <span style="color: #808080;">&#91;</span><span style="color: #0000FF;">varchar</span><span style="color: #808080;">&#93;</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">NULL</span>,
	<span style="color: #808080;">&#91;</span>tweep<span style="color: #808080;">&#93;</span> <span style="color: #808080;">&#91;</span><span style="color: #0000FF;">varchar</span><span style="color: #808080;">&#93;</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">NULL</span>
<span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">ON</span> <span style="color: #808080;">&#91;</span><span style="color: #0000FF;">PRIMARY</span><span style="color: #808080;">&#93;</span>
&nbsp;
GO
&nbsp;
<span style="color: #0000FF;">SET</span> ANSI_PADD<span style="color: #808080;">IN</span>G <span style="color: #0000FF;">OFF</span>
GO</pre></td></tr></table></div>

<p>There’s a few dupes in the below list, because people are listed in multiple sections, so run the below TSQL script to de-duplicate it.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p835code28'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p83528"><td class="code" id="p835code28"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">ALTER</span> <span style="color: #0000FF;">TABLE</span> dbo.<span style="color: #202020;">sqlserverpedia</span> <span style="color: #0000FF;">ADD</span> Id <span style="color: #0000FF;">INTEGER</span> <span style="color: #0000FF;">IDENTITY</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1</span>,<span style="color: #000;">1</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">NOT</span> <span style="color: #808080;">NULL</span> <span style="color: #0000FF;">PRIMARY</span> <span style="color: #0000FF;">KEY</span>;
GO
&nbsp;
<span style="color: #0000FF;">DELETE</span> t1
<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">sqlserverpedia</span> <span style="color: #0000FF;">AS</span> t1
<span style="color: #0000FF;">INNER</span> <span style="color: #808080;">JOIN</span> dbo.<span style="color: #202020;">sqlserverpedia</span> <span style="color: #0000FF;">AS</span> t2
	<span style="color: #0000FF;">ON</span> t1.<span style="color: #202020;">tweep</span> <span style="color: #808080;">=</span> t2.<span style="color: #202020;">tweep</span>
<span style="color: #0000FF;">WHERE</span> t1.<span style="color: #202020;">id</span> <span style="color: #808080;">&lt;</span> t2.<span style="color: #202020;">id</span>;
&nbsp;
<span style="color: #008080;">-- Additional column we'll use later</span>
<span style="color: #0000FF;">ALTER</span> <span style="color: #0000FF;">TABLE</span> dbo.<span style="color: #202020;">sqlserverpedia</span> <span style="color: #0000FF;">ADD</span> done <span style="color: #0000FF;">BIT</span> <span style="color: #0000FF;">DEFAULT</span> <span style="color: #000;">0</span>;</pre></td></tr></table></div>

<p>Next we’ll need to create the list. The below TSQL will do this (for SQL 2008). Make a note of the list id as we’ll need this later.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p835code29'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p83529"><td class="code" id="p835code29"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">DECLARE</span> @list_name <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">30</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">'sqlserverpedia list'</span>;
<span style="color: #008080;">-- Turn on relational resultsets in Tweet-SQL</span>
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_cfg_resultset_send</span> <span style="color: #000;">1</span>;
<span style="color: #008080;">-- Create the list</span>
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_list_post_lists</span> @list_name, <span style="color: #FF0000;">'public'</span>, null;</pre></td></tr></table></div>

<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/07/tweetsql_twitter_list_created.png"><img style="display: inline; border-width: 0px;" title="Tweet-SQL twitter list created" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/07/tweetsql_twitter_list_created_thumb.png" border="0" alt="tweetsql twitter list created thumb Creating a sqlserverpedia list with Tweet SQL" width="644" height="161" /></a></p>
<p>Next we’ll add the users onto this list. After each record is added to the Twitter list it is flagged as done so you can simply re-run the script if something fails halfway through.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p835code30'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p83530"><td class="code" id="p835code30"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">DECLARE</span> @tweep <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">30</span><span style="color: #808080;">&#41;</span>, @list_id <span style="color: #0000FF;">INTEGER</span>;
&nbsp;
<span style="color: #008080;">-- Set your list id here</span>
<span style="color: #0000FF;">SET</span> @list_id <span style="color: #808080;">=</span> <span style="color: #000;">17542298</span>;
&nbsp;
<span style="color: #008080;">-- Turn off resultsets in Tweet-SQL</span>
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_cfg_resultset_send</span> <span style="color: #000;">0</span>;
&nbsp;
<span style="color: #0000FF;">DECLARE</span> tweeps <span style="color: #0000FF;">CURSOR</span> <span style="color: #0000FF;">LOCAL</span> FAST_F<span style="color: #808080;">OR</span>WARD <span style="color: #0000FF;">FOR</span> <span style="color: #0000FF;">SELECT</span> tweep
					 <span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">sqlserverpedia</span>
					 <span style="color: #0000FF;">WHERE</span> done <span style="color: #0000FF;">IS</span> <span style="color: #808080;">NULL</span>;
&nbsp;
<span style="color: #008080;">-- Open the cursor and get the first result</span>
<span style="color: #0000FF;">OPEN</span> tweeps;
<span style="color: #0000FF;">FETCH</span> <span style="color: #0000FF;">NEXT</span> <span style="color: #0000FF;">FROM</span> tweeps <span style="color: #0000FF;">INTO</span> @tweep;
&nbsp;
<span style="color: #0000FF;">WHILE</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">@@FETCH_STATUS</span> <span style="color: #808080;">=</span> <span style="color: #000;">0</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">BEGIN</span>
&nbsp;
	<span style="color: #008080;">-- Add the tweep to the list</span>
	<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_list_post_list_members</span> @list_id, @tweep, null;
	<span style="color: #008080;">-- Flag the current record as done</span>
	<span style="color: #0000FF;">UPDATE</span> dbo.<span style="color: #202020;">sqlserverpedia</span>
	<span style="color: #0000FF;">SET</span> done <span style="color: #808080;">=</span> <span style="color: #000;">1</span>
	<span style="color: #0000FF;">WHERE</span> tweep <span style="color: #808080;">=</span> @tweep;
	<span style="color: #008080;">-- Wait for a bit so we don't annoy twitter</span>
	<span style="color: #0000FF;">WAITFOR</span> DELAY <span style="color: #FF0000;">'00:00:05'</span>
	<span style="color: #008080;">-- Fetch the next row</span>
	<span style="color: #0000FF;">FETCH</span> <span style="color: #0000FF;">NEXT</span> <span style="color: #0000FF;">FROM</span> tweeps <span style="color: #0000FF;">INTO</span> @tweep;
&nbsp;
<span style="color: #0000FF;">END</span>
&nbsp;
<span style="color: #008080;">-- Clean up</span>
<span style="color: #0000FF;">DEALLOCATE</span> tweeps;
<span style="color: #008080;">-- Turn Tweet-SQL resultsets back on</span>
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_cfg_resultset_send</span> <span style="color: #000;">1</span>;</pre></td></tr></table></div>

<p>See my finished list <a href="http://twitter.com/rhyscampbell/sqlserverpedia-list" target="_blank">here</a> and follow <a href="http://twitter.com/rhyscampbell" target="_blank">me on twitter</a> for more TSQL tomfoolery!</p>
<p><map name='google_ad_map_835_a45beff5d2e172f6'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/835?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_835_a45beff5d2e172f6' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=835&amp;url=http%3A%2F%2Fwww.youdidwhatwithtsql.com%2Fcreating-a-sqlserverpedia-list-with-tweet-sql%2F835' title="Creating a sqlserverpedia list with Tweet SQL" alt=" Creating a sqlserverpedia list with Tweet SQL" /></p><p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/creating-a-sqlserverpedia-list-with-tweet-sql/835">Creating a sqlserverpedia list with Tweet-SQL</a></p>
<div class="none"><div class="g-plusone" data-href="http://www.youdidwhatwithtsql.com/creating-a-sqlserverpedia-list-with-tweet-sql/835" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.youdidwhatwithtsql.com/creating-a-sqlserverpedia-list-with-tweet-sql/835/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring oAuth for Tweet-SQL</title>
		<link>http://www.youdidwhatwithtsql.com/configuring-oauth-for-tweet-sql/814</link>
		<comments>http://www.youdidwhatwithtsql.com/configuring-oauth-for-tweet-sql/814#comments</comments>
		<pubDate>Sat, 26 Jun 2010 15:56:48 +0000</pubDate>
		<dc:creator>Rhys</dc:creator>
				<category><![CDATA[Tweet-SQL]]></category>
		<category><![CDATA[oAuth]]></category>

		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/configuring-oauth-for-tweet-sql/814</guid>
		<description><![CDATA[Twitter are soon requiring that all applications accessing their API use oAuth instead of basic authentication. This means you don’t have to provide your password to third parties when using their apps. I’ve been busy adding this to the upcoming version of Tweet-SQL and here’s a quick guide to setting up oAuth. After installing Tweet-SQL [...]<p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/configuring-oauth-for-tweet-sql/814">Configuring oAuth for Tweet-SQL</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com" target="_blank">Twitter</a> are soon requiring that all applications accessing their API use <a href="http://oauth.net/" target="_blank">oAuth</a> instead of basic authentication. This means you don’t have to provide your password to third parties when using their apps. I’ve been busy adding this to the upcoming version of <a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a> and here’s a quick guide to setting up oAuth.</p>
<p>After installing Tweet-SQL launch the configuration program by clicking Start &gt; All Programs &gt; Tweet-SQL &gt; Tweet-SQL Config.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/06/tweetsql_configuration_program.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="tweet-sql configuration program" border="0" alt="tweetsql configuration program thumb Configuring oAuth for Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/06/tweetsql_configuration_program_thumb.png" width="333" height="348" /></a> </p>
<p>Ensure the <strong>Authentication</strong> drop down is set to OAuth. Enter your username in the box labelled <strong>username</strong>. <a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a> needs your username for some api calls to work. Click File &gt; Save Config to save this information.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/06/tweetsql_config.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="tweet-sql config" border="0" alt="tweetsql config thumb Configuring oAuth for Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/06/tweetsql_config_thumb.png" width="333" height="348" /></a> </p>
<p>Next click oAuth &gt; Get Access Token. Tweet-SQL will launch your default web browser to contact <a href="http://twitter.com" target="_blank">Twitter</a>. Enter your login details into twitter and click <strong>Allow</strong>.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/06/twitter_oauth_signin.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="twitter oauth sign in" border="0" alt="twitter oauth signin thumb Configuring oAuth for Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/06/twitter_oauth_signin_thumb.png" width="644" height="349" /></a> </p>
<p>Once you have granted Tweet-SQL access you will be provided with a PIN. Copy this PIN to your clipboard.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/06/twitter_oauth_pin.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="twitter oauth pin" border="0" alt="twitter oauth pin thumb Configuring oAuth for Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/06/twitter_oauth_pin_thumb.png" width="644" height="349" /></a> </p>
<p>Return to the Tweet-SQL configuration program and enter the PIN in the dialog box.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/06/tweetsql_oauth_pin.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="tweet-sql oauth pin" border="0" alt="tweetsql oauth pin thumb Configuring oAuth for Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/06/tweetsql_oauth_pin_thumb.png" width="474" height="136" /></a> </p>
<p>Tweet-SQL will then verify the PIN with Twitter to complete the process. After a few moments a confirmation will be displayed.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/06/tweetsql_oauth_confirmation.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="tweet-sql oauth confirmation" border="0" alt="tweetsql oauth confirmation thumb Configuring oAuth for Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/06/tweetsql_oauth_confirmation_thumb.png" width="245" height="148" /></a> </p>
<p>You are now ready to start using Tweet-SQL!</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p814code32'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p81432"><td class="code" id="p814code32"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_sts_update</span> <span style="color: #FF0000;">'Dinner on the river tonight!'</span>, null;</pre></td></tr></table></div>

<p>You can continue using basic authentication with Twitter until <strong>August 16th 2010</strong>. The new version of Tweet-SQL supporting oAuth will be released within the next few weeks. Find out <a href="http://dev.twitter.com/pages/oauth_faq" target="_blank">more about oAuth</a> and download <a href="http://www.tweet-sql.com/download.php" target="_blank">Tweet-SQL now</a>!</p>
<p><map name='google_ad_map_814_a45beff5d2e172f6'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/814?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_814_a45beff5d2e172f6' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=814&amp;url=http%3A%2F%2Fwww.youdidwhatwithtsql.com%2Fconfiguring-oauth-for-tweet-sql%2F814' title="Configuring oAuth for Tweet SQL" alt=" Configuring oAuth for Tweet SQL" /></p><p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/configuring-oauth-for-tweet-sql/814">Configuring oAuth for Tweet-SQL</a></p>
<div class="none"><div class="g-plusone" data-href="http://www.youdidwhatwithtsql.com/configuring-oauth-for-tweet-sql/814" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.youdidwhatwithtsql.com/configuring-oauth-for-tweet-sql/814/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free Database Sync Tools</title>
		<link>http://www.youdidwhatwithtsql.com/free-database-sync-tools/684</link>
		<comments>http://www.youdidwhatwithtsql.com/free-database-sync-tools/684#comments</comments>
		<pubDate>Wed, 24 Feb 2010 21:45:55 +0000</pubDate>
		<dc:creator>Rhys</dc:creator>
				<category><![CDATA[DBA]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Database Synchronisation]]></category>
		<category><![CDATA[SQL Compare]]></category>

		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/free-database-sync-tools/684</guid>
		<description><![CDATA[I&#8217;m a big fan of Redgate SQL Compare but it&#8217;s been good to see the arrival of a few free alternatives. Life previous to these tools really does seem like the stone age now eliminating those &#34;oh $h**, I forgot about that!&#34; moments. I&#8217;d always go for Redgate every time but, if you don&#8217;t have [...]<p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/free-database-sync-tools/684">Free Database Sync Tools</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big fan of <a href="http://www.red-gate.com/products/SQL_Compare/index-2.htm" target="_blank">Redgate SQL Compare</a> but it&#8217;s been good to see the arrival of a few free alternatives. Life previous to these tools really does seem like the stone age now eliminating those <em>&quot;oh $h**, I forgot about that!&quot;</em> moments. I&#8217;d always go for Redgate every time but, if you don&#8217;t have it in your budget, these tools may be worth checking out.</p>
<p><a href="http://www.codeplex.com/OpenDBiff/" target="_blank">OpenDBDiff</a></p>
<p>This is an open source project hosted on <a href="http://www.codeplex.com" target="_blank">Codeplex</a> that has database compare and, crucially, synchronisation abilities. I&#8217;ve used this tool in a few production deployments and have found it useful. I don&#8217;t fully trust it yet, it took a while to trust Redgate, but I haven&#8217;t encountered any major difficulties yet. I&#8217;ve had issues with synchronisation scripts and dependency ordering but nothing I have found too frustrating.</p>
<p>The user interface is basic, but well designed, and it&#8217;s easy to get productive straight away.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/02/OpenDBDiff_1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="OpenDBDiff Main Screen" border="0" alt="OpenDBDiff 1 thumb Free Database Sync Tools" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/02/OpenDBDiff_1_thumb.png" width="244" height="150" /></a> </p>
<p>You can&#8217;t stay within the tool to synchronise your databases but, as there is a non-functional &quot;Actions Report&quot; tab, it seems this is on the roadmap.</p>
<p>Open DBDiff can synchronize the following object types.</p>
<ul>
<li>Tables (including Table Options like vardecimal, text in row, etc.) </li>
<li>Columns (including Computed Columns, XML options, Identities, etc.) </li>
<li>Constraints </li>
<li>Indexes (and XML Indexes) </li>
<li>XML Schemas </li>
<li>Table Types </li>
<li>User Data Types (UDT) </li>
<li>CLR Objects (Assemblies, CLR-UDT, CLR-Stored Procedure, CLR-Triggers) </li>
<li>Triggers (including DDL Triggers) </li>
<li>Synonyms </li>
<li>Schemas </li>
<li>File groups </li>
<li>Views </li>
<li>Functions </li>
<li>Store Procedures </li>
<li>Partition Functions/Schemes </li>
<li>Users </li>
<li>Roles</li>
</ul>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/02/OpenDBDiff_Syncronisation_Script.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="OpenDBDiff Syncronisation Script" border="0" alt="OpenDBDiff Syncronisation Script thumb Free Database Sync Tools" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/02/OpenDBDiff_Syncronisation_Script_thumb.png" width="244" height="150" /></a> </p>
<p>I did have trouble connecting to different instances of SQL Server on the same machine. This shouldn&#8217;t matter much for production use as we&#8217;d normally be synchronising different boxes.</p>
<p><a href="http://www.starinix.com/sqlcompare02.htm" target="_blank">Starinix Database Compare</a></p>
<p>This is a freeware tool that is able to compare <a href="http://www.mysql.com" target="_blank">MySQL</a>, Access and <a href="http://www.microsoft.com/sqlserver/2008/en/us/default.aspx" target="_blank">SQL Server</a> databases and any combinations thereof. Not sure this would be useful in my case but I guess someone might do (I can already tell you your MySQL and SQL Server procedures do not match!).</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/02/Starnix_Database_Compare.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Starinix Database Compare" border="0" alt="Starnix Database Compare thumb Free Database Sync Tools" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/02/Starnix_Database_Compare_thumb.png" width="244" height="150" /></a> </p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/02/Starinix_Database_Compare_1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Starinix Database Compare" border="0" alt="Starinix Database Compare 1 thumb Free Database Sync Tools" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/02/Starinix_Database_Compare_1_thumb.png" width="244" height="150" /></a> </p>
<p><strong>Key features</strong></p>
<ul>
<li>Take snapshots of the structure of the database and review it later. </li>
<li>Snapshots can be saved anywhere, allowing you to take snapshots of any database for reviewing later. </li>
<li>Compare two online database connections. </li>
<li>Compare an online database connection to an off-line snapshot. </li>
<li>Compare two off-line snapshots. </li>
<li>Use integrated or user based security. </li>
<li>Compares: views, constraints, stored procedures, functions, tables and fields. </li>
<li>Compare Access database to an SQL Server database. </li>
<li>Compare Access database to a MySQL database. </li>
<li>Compare Access database to another Access database. </li>
<li>Compare MySQL Database to an SQL Server Database. </li>
<li>Compare SQL Server 2000 to SQL Server 2005.</li>
</ul>
<p>I&#8217;ve done some quick testing of this tool and it does seem to be accurate, spotting all of my edits made to tables, procedures and functions. The interface is ok but does need some polish. For example, it would be a nice touch for the &quot;SQL View&quot; scroll bar to scroll both the source and destination views. Identifying differences to large procedures isn&#8217;t as easy as it should be but clicking &quot;Script Comparison&quot; launches an external diff tool that does a better job.</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/02/Starnix_Procedure_Compare.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Starinix Procedure Compare" border="0" alt="Starnix Procedure Compare thumb Free Database Sync Tools" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2010/02/Starnix_Procedure_Compare_thumb.png" width="244" height="148" /></a> </p>
<p>This is strictly a compare tool, meaning there are no synchronisation abilities, so you&#8217;ll have to do a little leg work to implement any needed changes.</p>
</p>
</p>
</p>
<p>Overall there&#8217;s no clear winner for me out of these two free tools. Both products have easy to use GUIs. <a href="http://opendbiff.codeplex.com/" target="_blank">OpenDBDiff</a> clearly has the edge as a synchronisation tool but <a href="http://starinix.com/sqlcompare02.htm" target="_blank">Starinix</a> has a few nice touches like the external diff tool and the snapshot feature.</p>
<p><map name='google_ad_map_684_a45beff5d2e172f6'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/684?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_684_a45beff5d2e172f6' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=684&amp;url=http%3A%2F%2Fwww.youdidwhatwithtsql.com%2Ffree-database-sync-tools%2F684' title="Free Database Sync Tools" alt=" Free Database Sync Tools" /></p><p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/free-database-sync-tools/684">Free Database Sync Tools</a></p>
<div class="none"><div class="g-plusone" data-href="http://www.youdidwhatwithtsql.com/free-database-sync-tools/684" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.youdidwhatwithtsql.com/free-database-sync-tools/684/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using TwitterCounter with Tweet-SQL</title>
		<link>http://www.youdidwhatwithtsql.com/using-twittercounter-with-tweet-sql/165</link>
		<comments>http://www.youdidwhatwithtsql.com/using-twittercounter-with-tweet-sql/165#comments</comments>
		<pubDate>Sat, 06 Jun 2009 15:10:46 +0000</pubDate>
		<dc:creator>Rhys</dc:creator>
				<category><![CDATA[Tweet-SQL]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[Twitter API]]></category>
		<category><![CDATA[Twitter App]]></category>
		<category><![CDATA[TwitterCounter]]></category>

		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/using-twittercounter-with-tweet-sql/165</guid>
		<description><![CDATA[TwitterCounter is a service that provides Twitter user statistics. In their own words; “The TwitterCounter API allows you to retrieve everything TwitterCounter knows about a certain Twitter username.” TwitterCounter basically provides statistics on followers and predictions on growth. The next version of Tweet-SQL will include a procedure to work with this data. Here’s how you [...]<p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/using-twittercounter-with-tweet-sql/165">Using TwitterCounter with Tweet-SQL</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://twittercounter.com/" target="_blank">TwitterCounter</a> is a service that provides <a href="http://twitter.com" target="_blank">Twitter</a> user statistics. In their own words; <em>“The TwitterCounter API allows you to retrieve everything TwitterCounter knows about a certain Twitter username.” </em><a href="http://twittercounter.com" target="_blank">TwitterCounter</a> basically provides statistics on followers and predictions on growth. The next version of <a href="http://www.tweet-sql.com/" target="_blank">Tweet-SQL</a> will include a procedure to work with this data. Here’s how you use it;</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p165code34'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p16534"><td class="code" id="p165code34"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">DECLARE</span> @username <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">30</span><span style="color: #808080;">&#41;</span>;
<span style="color: #008080;">-- Set Twitter username</span>
<span style="color: #0000FF;">SET</span> @username <span style="color: #808080;">=</span> <span style="color: #FF0000;">'rhyscampbell'</span>;
<span style="color: #008080;">-- Execute the procedure</span>
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_util_twitterCounter</span> @username, null, null;</pre></td></tr></table></div>

<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2009/06/image8.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Tweet-SQL results from TwitterCounter" border="0" alt="image thumb8 Using TwitterCounter with Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2009/06/image-thumb8.png" width="644" height="110" /></a> </p>
<p>Here’s the raw xml that is accessible by using OUTPUT parameters.</p>
<pre>&lt;twittercounter&gt;
  &lt;user_id&gt;297689&lt;/user_id&gt;
  &lt;user_name&gt;rhyscampbell&lt;/user_name&gt;
  &lt;followers_current&gt;255&lt;/followers_current&gt;
  &lt;date_updated&gt;2009-06-06&lt;/date_updated&gt;
  &lt;url&gt;http://www.youdidwhatwithtsql.com&lt;/url&gt;
  &lt;avatar&gt;70800065/n571986135_2362730_9166_normal.jpg&lt;/avatar&gt;
  &lt;follow_days&gt;253&lt;/follow_days&gt;
  &lt;started_followers&gt;18&lt;/started_followers&gt;
  &lt;growth_since&gt;237&lt;/growth_since&gt;
  &lt;average_growth&gt;1&lt;/average_growth&gt;
  &lt;tomorrow&gt;256&lt;/tomorrow&gt;
  &lt;next_month&gt;285&lt;/next_month&gt;
  &lt;followers_yesterday&gt;258&lt;/followers_yesterday&gt;
  &lt;rank&gt;90877&lt;/rank&gt;
  &lt;followers_2w_ago&gt;18&lt;/followers_2w_ago&gt;
  &lt;growth_since_2w&gt;237&lt;/growth_since_2w&gt;
  &lt;average_growth_2w&gt;17&lt;/average_growth_2w&gt;
  &lt;tomorrow_2w&gt;272&lt;/tomorrow_2w&gt;
  &lt;next_month_2w&gt;765&lt;/next_month_2w&gt;
  &lt;followersperdate&gt;
    &lt;date2009-05-11&gt;227&lt;/date2009-05-11&gt;
    &lt;date2009-05-12&gt;227&lt;/date2009-05-12&gt;
    &lt;date2009-05-15&gt;230&lt;/date2009-05-15&gt;
    &lt;date2009-05-17&gt;230&lt;/date2009-05-17&gt;
    &lt;date2009-05-20&gt;232&lt;/date2009-05-20&gt;
    &lt;date2009-05-22&gt;239&lt;/date2009-05-22&gt;
    &lt;date2009-05-24&gt;241&lt;/date2009-05-24&gt;
    &lt;date2009-05-26&gt;249&lt;/date2009-05-26&gt;
    &lt;date2009-05-29&gt;248&lt;/date2009-05-29&gt;
    &lt;date2009-05-31&gt;250&lt;/date2009-05-31&gt;
    &lt;date2009-06-02&gt;248&lt;/date2009-06-02&gt;
    &lt;date2009-06-04&gt;258&lt;/date2009-06-04&gt;
    &lt;date2009-06-06&gt;255&lt;/date2009-06-06&gt;
  &lt;/followersperdate&gt;
&lt;/twittercounter&gt;</pre>
<p><map name='google_ad_map_165_a45beff5d2e172f6'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/165?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_165_a45beff5d2e172f6' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=165&amp;url=http%3A%2F%2Fwww.youdidwhatwithtsql.com%2Fusing-twittercounter-with-tweet-sql%2F165' title="Using TwitterCounter with Tweet SQL" alt=" Using TwitterCounter with Tweet SQL" /></p><p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/using-twittercounter-with-tweet-sql/165">Using TwitterCounter with Tweet-SQL</a></p>
<div class="none"><div class="g-plusone" data-href="http://www.youdidwhatwithtsql.com/using-twittercounter-with-tweet-sql/165" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.youdidwhatwithtsql.com/using-twittercounter-with-tweet-sql/165/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shrinking Tweets with Tweet-SQL</title>
		<link>http://www.youdidwhatwithtsql.com/shrinking-tweets-with-tweet-sql/105</link>
		<comments>http://www.youdidwhatwithtsql.com/shrinking-tweets-with-tweet-sql/105#comments</comments>
		<pubDate>Tue, 19 May 2009 20:24:23 +0000</pubDate>
		<dc:creator>Rhys</dc:creator>
				<category><![CDATA[Tweet-SQL]]></category>
		<category><![CDATA[TweetShrink]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[Twitter API]]></category>
		<category><![CDATA[Twitter App]]></category>

		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/shrinking-tweets-with-tweet-sql/105</guid>
		<description><![CDATA[To get your point across on Twitter you sometimes have to try and shorten your tweets. This can be a pain for anyone over 30 who doesn’t know txtspk. Thankfully some clever chap has come to the rescue with TweetShrink and I’ve integrated it into Tweet-SQL. Here’s how you use it; ?View Code TSQLDECLARE @shrunk [...]<p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/shrinking-tweets-with-tweet-sql/105">Shrinking Tweets with Tweet-SQL</a></p>
]]></description>
			<content:encoded><![CDATA[<p>To get your point across on <a href="http://twitter.com" target="_blank">Twitter</a> you sometimes have to try and shorten your tweets. This can be a pain for anyone over 30 who doesn’t know <a href="http://en.wikipedia.org/wiki/SMS_language" target="_blank">txtspk</a>. Thankfully some clever chap has come to the rescue with <a href="http://tweetshrink.com" target="_blank">TweetShrink</a> and I’ve integrated it into <a href="http://tweet-sql.com" target="_blank">Tweet-SQL</a>. Here’s how you use it;</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p105code36'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p10536"><td class="code" id="p105code36"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">DECLARE</span> @shrunk <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">140</span><span style="color: #808080;">&#41;</span>,
		@shaved <span style="color: #0000FF;">INT</span>;
&nbsp;
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_util_tweetShrink</span> <span style="color: #FF0000;">'For some strange reason I have developed a tendency to think every new version of Windows is more of a resource pig.'</span>, @shrunk <span style="color: #0000FF;">OUTPUT</span>, @shaved <span style="color: #0000FF;">OUTPUT</span>;
&nbsp;
<span style="color: #008080;">-- The shortened Tweet</span>
<span style="color: #0000FF;">SELECT</span> @shrunk <span style="color: #0000FF;">AS</span> shrunkTweet;
<span style="color: #008080;">-- How may characters have been shaved off?</span>
<span style="color: #0000FF;">SELECT</span> @shaved <span style="color: #0000FF;">AS</span> shaved;</pre></td></tr></table></div>

<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2009/05/image3.png"><img title="Using TweetShrink in Tweet-SQL" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="132" alt="image thumb3 Shrinking Tweets with Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2009/05/image-thumb3.png" width="644" border="0" /></a> </p>
<p>A future version of <a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a> will include this functionality along with a few more cool surprises.</p>
<p><map name='google_ad_map_105_a45beff5d2e172f6'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/105?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_105_a45beff5d2e172f6' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=105&amp;url=http%3A%2F%2Fwww.youdidwhatwithtsql.com%2Fshrinking-tweets-with-tweet-sql%2F105' title="Shrinking Tweets with Tweet SQL" alt=" Shrinking Tweets with Tweet SQL" /></p><p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/shrinking-tweets-with-tweet-sql/105">Shrinking Tweets with Tweet-SQL</a></p>
<div class="none"><div class="g-plusone" data-href="http://www.youdidwhatwithtsql.com/shrinking-tweets-with-tweet-sql/105" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.youdidwhatwithtsql.com/shrinking-tweets-with-tweet-sql/105/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Know who your friends are with Tweet-SQL</title>
		<link>http://www.youdidwhatwithtsql.com/know-who-your-friends-are-with-tweet-sql/96</link>
		<comments>http://www.youdidwhatwithtsql.com/know-who-your-friends-are-with-tweet-sql/96#comments</comments>
		<pubDate>Fri, 01 May 2009 12:49:43 +0000</pubDate>
		<dc:creator>Rhys</dc:creator>
				<category><![CDATA[Tweet-SQL]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[Twitter API]]></category>

		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/know-who-your-friends-are-with-tweet-sql/96</guid>
		<description><![CDATA[Tweet-SQL version 2 supports the new Twitter social graph API methods. These are two very simple methods to get all of your followers, or friends, Twitter user ids. There are four procedures in Tweet-SQL that support these methods. tweet_sog_followers &#8211; Returns the ids of the authenticating users followers or, if a non-null value is supplied [...]<p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/know-who-your-friends-are-with-tweet-sql/96">Know who your friends are with Tweet-SQL</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tweet-sql.com" target="_blank">Tweet-SQL</a> version 2 supports the new <a href="http://twitter.com" target="_blank">Twitter</a> social graph <a href="http://apiwiki.twitter.com/Twitter-API-Documentation" target="_blank">API methods</a>. These are two very simple methods to get all of your followers, or friends, Twitter user ids. There are four procedures in <a href="http://www.tweet-sql.com/" target="_blank">Tweet-SQL</a> that support these methods. </p>
<ul>
<li>tweet_sog_followers &#8211; Returns the ids of the authenticating users followers or, if a non-null value is supplied for @user_id_or_nick, the ids of the specified user’s followers. </li>
<li>tweet_sog_friends &#8211; Returns the ids of the authenticating users friends or, if a non-null value is supplied for @user_id_or_nick, the ids of the specified user’s friends. </li>
<li>tweet_sog_followersTable &#8211; Returns the same data from tweet_sog_followers but saves it to a table in the SQL Server database Tweet-SQL is hosted in. The table created is called tweet_followersIds. Any existing table with this name is dropped at the start of the procedure execution. </li>
<li>tweet_sog_friendsTable &#8211; Returns the same data from tweet_sog_friends but saves it to a table in the SQL Server database Tweet-SQL is hosted in. The table created is called tweet_friendsIds. Any existing table with this name is dropped at the start of the procedure execution. </li>
</ul>
<p><a href="http://twitter.com" target="_blank">Twitter</a> added these <a href="http://groups.google.com/group/twitter-development-talk/browse_thread/thread/98f4c4d13954e8bf/b32f96fb0f73a7ae?lnk=gst&amp;q=social+graph#b32f96fb0f73a7ae" target="_blank">new methods</a> to help out application developers that were finding the API limits too restrictive.</p>
<p> Executing the below <a href="http://en.wikipedia.org/wiki/T-SQL" target="_blank">T-SQL</a> will fetch all the ids of the people you follow;</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p96code46'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9646"><td class="code" id="p96code46"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">-- The ids of who you follow</span>
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_sog_friendsTable</span> null;</pre></td></tr></table></div>

<p>A new table will be created in the same database.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p96code47'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9647"><td class="code" id="p96code47"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span> <span style="color: #0000FF;">FROM</span> tweet_friendsIds;</pre></td></tr></table></div>

<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2009/05/image.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="243" alt="image thumb Know who your friends are with Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2009/05/image-thumb.png" width="166" border="0" /></a> </p>
<p>Getting the list of ids for the <a href="http://twitter.com" target="_blank">Twitter</a> users is just as easy;</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p96code48'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9648"><td class="code" id="p96code48"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">-- The ids of all your followers</span>
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_sog_followersTable</span> null;</pre></td></tr></table></div>

<p>This data can be found in a table called tweet_followersTable</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p96code49'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9649"><td class="code" id="p96code49"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span> <span style="color: #0000FF;">FROM</span> tweet_followersIds;</pre></td></tr></table></div>

</p>
<p><a href="http://www.youdidwhatwithtsql.com/wp-content/uploads/2009/05/image1.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="243" alt="image thumb1 Know who your friends are with Tweet SQL" src="http://www.youdidwhatwithtsql.com/wp-content/uploads/2009/05/image-thumb1.png" width="163" border="0" /></a> </p>
<p>Now we have this data it’s easy to find out the users we’re not following back.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p96code50'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9650"><td class="code" id="p96code50"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">-- People you're not following back</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span>
<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">tweet_followersIds</span>
<span style="color: #0000FF;">EXCEPT</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span>
<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">tweet_friendsIds</span>;</pre></td></tr></table></div>

<p>People you follow and who follow you back.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p96code51'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9651"><td class="code" id="p96code51"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">-- Twitter buddies! You guys should have a beer!</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span>
<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">tweet_followersIds</span>
<span style="color: #0000FF;">INTERSECT</span> 
<span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span>
<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">tweet_friendsIds</span></pre></td></tr></table></div>

<p>and people who don&#8217;t follow you back&#8230;</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p96code52'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9652"><td class="code" id="p96code52"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">-- Who's not following you back?</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span>
<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">tweet_friendsIds</span>
<span style="color: #0000FF;">EXCEPT</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span>
<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">tweet_followersIds</span>;</pre></td></tr></table></div>

<p>If you really must know the names, of the people who aren&#8217;t following back, then run this <a href="http://en.wikipedia.org/wiki/T-SQL" target="_blank">T-SQL</a> script. Just don’t react like <a href="http://en.wikipedia.org/wiki/Mark_Corrigan" target="_blank">Mark Corrigan</a> would.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p96code53'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9653"><td class="code" id="p96code53"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">-- Really need to know the names of the </span>
<span style="color: #008080;">-- people who aren't following you back?</span>
&nbsp;
<span style="color: #008080;">-- Insert the people who aren't following</span>
<span style="color: #008080;">-- you into a new table called NoFollows</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span>
<span style="color: #0000FF;">INTO</span> NoFollows
<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">tweet_friendsIds</span>
<span style="color: #0000FF;">EXCEPT</span>
<span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span>
<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">tweet_followersIds</span>;
&nbsp;
<span style="color: #008080;">-- Add PK</span>
<span style="color: #0000FF;">ALTER</span> <span style="color: #0000FF;">TABLE</span> NoFollows <span style="color: #0000FF;">ADD</span> <span style="color: #0000FF;">CONSTRAINT</span> 
	pk_id <span style="color: #0000FF;">PRIMARY</span> <span style="color: #0000FF;">KEY</span> <span style="color: #0000FF;">CLUSTERED</span>
	<span style="color: #808080;">&#40;</span>
		Id
	<span style="color: #808080;">&#41;</span>
	<span style="color: #0000FF;">ON</span> <span style="color: #808080;">&#91;</span><span style="color: #0000FF;">PRIMARY</span><span style="color: #808080;">&#93;</span>;
&nbsp;
<span style="color: #008080;">-- Add a column to hold Twitter name &amp;amp; screen name</span>
<span style="color: #0000FF;">ALTER</span> <span style="color: #0000FF;">TABLE</span> NoFollows <span style="color: #0000FF;">ADD</span> name <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">50</span><span style="color: #808080;">&#41;</span>, screen_name <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">50</span><span style="color: #808080;">&#41;</span>;
&nbsp;
<span style="color: #008080;">-- Create a cursor to cycle through the users</span>
<span style="color: #0000FF;">DECLARE</span> twitterCursor <span style="color: #0000FF;">CURSOR</span> <span style="color: #0000FF;">STATIC</span> <span style="color: #0000FF;">FOR</span> <span style="color: #0000FF;">SELECT</span> Id
					<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">NoFollows</span>
					<span style="color: #0000FF;">WHERE</span> name <span style="color: #0000FF;">IS</span> <span style="color: #808080;">NULL</span>;
&nbsp;
<span style="color: #0000FF;">DECLARE</span> @id <span style="color: #0000FF;">INT</span>, @name <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">50</span><span style="color: #808080;">&#41;</span>, @screen_name <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">50</span><span style="color: #808080;">&#41;</span>,
	@xml XML, @handle <span style="color: #0000FF;">INT</span>;
&nbsp;
<span style="color: #008080;">-- Turn of resultsets from Tweet-SQL</span>
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_cfg_resultset_send</span> <span style="color: #000;">0</span>;
&nbsp;
<span style="color: #008080;">-- Open the cursor and get the first result</span>
<span style="color: #0000FF;">OPEN</span> twitterCursor;
<span style="color: #0000FF;">FETCH</span> <span style="color: #0000FF;">NEXT</span> <span style="color: #0000FF;">FROM</span> twitterCursor <span style="color: #0000FF;">INTO</span> @Id;
&nbsp;
<span style="color: #008080;">-- Loop!</span>
<span style="color: #0000FF;">WHILE</span> <span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">@@FETCH_STATUS</span> <span style="color: #808080;">=</span> <span style="color: #000;">0</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">BEGIN</span>
&nbsp;
	<span style="color: #008080;">-- Get the user information</span>
	<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_usr_show</span> @Id, null, @xml <span style="color: #0000FF;">OUTPUT</span>;
	<span style="color: #008080;">-- Prepare an xml document</span>
	<span style="color: #0000FF;">EXEC</span> <span style="color: #AF0000;">sp_xml_preparedocument</span> @handle <span style="color: #0000FF;">OUTPUT</span>, @xml;
&nbsp;
	<span style="color: #0000FF;">SELECT</span> @name <span style="color: #808080;">=</span> name, 
		   @screen_name <span style="color: #808080;">=</span> screen_name
	<span style="color: #0000FF;">FROM</span> <span style="color: #0000FF;">OPENXML</span> <span style="color: #808080;">&#40;</span>@handle, <span style="color: #FF0000;">'/user'</span>, <span style="color: #000;">2</span><span style="color: #808080;">&#41;</span>
	<span style="color: #0000FF;">WITH</span>
	<span style="color: #808080;">&#40;</span>
		name <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">50</span><span style="color: #808080;">&#41;</span>,
		screen_name <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">50</span><span style="color: #808080;">&#41;</span>
	<span style="color: #808080;">&#41;</span>;
&nbsp;
	<span style="color: #008080;">-- Update the table with the retrieved details</span>
	<span style="color: #0000FF;">UPDATE</span> dbo.<span style="color: #202020;">NoFollows</span>
	<span style="color: #0000FF;">SET</span> name <span style="color: #808080;">=</span> @name,
	screen_name <span style="color: #808080;">=</span> @screen_name
	<span style="color: #0000FF;">WHERE</span> Id <span style="color: #808080;">=</span> @id;
&nbsp;
	<span style="color: #008080;">-- destroy the xml document</span>
	<span style="color: #0000FF;">EXEC</span> <span style="color: #AF0000;">sp_xml_removedocument</span> @handle;
&nbsp;
	<span style="color: #008080;">-- Get the next row</span>
	<span style="color: #0000FF;">FETCH</span> <span style="color: #0000FF;">NEXT</span> <span style="color: #0000FF;">FROM</span> twitterCursor <span style="color: #0000FF;">INTO</span> @Id;
&nbsp;
	<span style="color: #008080;">-- Be nice to Twitter Servers!</span>
	<span style="color: #0000FF;">WAITFOR</span> DELAY <span style="color: #FF0000;">'00:00:05'</span>;
&nbsp;
<span style="color: #0000FF;">END</span> <span style="color: #008080;">-- EOF While Loop</span>
&nbsp;
<span style="color: #008080;">-- Clean up!</span>
<span style="color: #0000FF;">CLOSE</span> twitterCursor;
<span style="color: #0000FF;">DEALLOCATE</span> twitterCursor;
<span style="color: #008080;">-- Turn resultsets from Tweet-SQL back on as appropriate</span>
<span style="color: #0000FF;">EXEC</span> dbo.<span style="color: #202020;">tweet_cfg_resultset_send</span> <span style="color: #000;">1</span>;</pre></td></tr></table></div>


<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p96code54'); return false;">View Code</a> TSQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p9654"><td class="code" id="p96code54"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span>
<span style="color: #0000FF;">FROM</span> dbo.<span style="color: #202020;">NoFollows</span>;</pre></td></tr></table></div>

<p><map name='google_ad_map_96_a45beff5d2e172f6'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/96?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_96_a45beff5d2e172f6' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=96&amp;url=http%3A%2F%2Fwww.youdidwhatwithtsql.com%2Fknow-who-your-friends-are-with-tweet-sql%2F96' title="Know who your friends are with Tweet SQL" alt=" Know who your friends are with Tweet SQL" /></p><p>Post from: <a href="http://www.youdidwhatwithtsql.com">youdidwhatwithtsql.com</a><br/><br/><a href="http://www.youdidwhatwithtsql.com/know-who-your-friends-are-with-tweet-sql/96">Know who your friends are with Tweet-SQL</a></p>
<div class="none"><div class="g-plusone" data-href="http://www.youdidwhatwithtsql.com/know-who-your-friends-are-with-tweet-sql/96" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.youdidwhatwithtsql.com/know-who-your-friends-are-with-tweet-sql/96/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

