<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>The Sales Engineer</title>
	
	<link>http://blog.atcp.us</link>
	<description>Sales Engineering, Sales Consulting, World Domination</description>
	<lastBuildDate>Thu, 03 May 2012 14:40:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/atcpllc" /><feedburner:info uri="atcpllc" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>What if your information wish came true?</title>
		<link>http://feedproxy.google.com/~r/atcpllc/~3/2Sb4xy19ApM/</link>
		<comments>http://blog.atcp.us/2012/05/03/what-if-your-information-wish-came-true/#comments</comments>
		<pubDate>Thu, 03 May 2012 14:40:35 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Sales Engineering]]></category>
		<category><![CDATA[Technology]]></category>

	<!-- AutoMeta Start -->
	<category>pieced</category>
	<category>commercial</category>
	<category>decisions</category>
	<category>valuation</category>
	<category>horizontals</category>
	<category>yellow</category>
	<category>grocery</category>
	<category>entrepreneur</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.atcp.us/?p=3626</guid>
		<description>&lt;p&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;
Yeah, we&amp;#8217;re all watching it happen, trying to capitalize on it. More information is not better information. People more &amp;amp; more are lazy-ing themselves out of making any &lt;em&gt;risky&lt;/em&gt; decisions. They want the same kind of assurances a conference room full of yes men and stakeholders would give them: Blame Management. As long as there is at least 1 person to blame if it is a bad decision (that is not you), then they say yes.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;But now there is/are magnitudes more info (or rather data) for a single person to go through, and even the yes-men can&amp;#8217;t go through it if pieced up-even if it could be pieced up. So what kind of decisions are there? 3 kinds, for us entrepreneur types:&lt;/p&gt;
&lt;p&gt;1. Personal&lt;br /&gt;
2. Job/Productivity&lt;br /&gt;
3. Commercial&lt;/p&gt;
&lt;p&gt;Personal: What products do I buy when filling up, or going to the grocery store? Think &amp;#8220;consumer&amp;#8221;.&lt;/p&gt;
&lt;p&gt;Job/Productivity: What stock should I buy/sell? Which job is best for me to move to (a combination of Personal)? Where should I be investing? Is my 401k performing properly/well for this market?&lt;/p&gt;
&lt;p&gt;Commercial: (think &amp;#8220;provider&amp;#8221;) Should I buy more widgets and stock-pile, or will their price go down in a few weeks and I should buy then? Is my company&amp;#8217;s valuation going up or down? Where is productivity/efficiency (think &amp;#8220;BI&amp;#8221;, or &amp;#8220;Green/Yellow/Red&amp;#8221;, or &amp;#8220;Executive Dashboard&amp;#8221;, etc.)?&lt;/p&gt;
&lt;p&gt;In all three &amp;#8220;horizontals&amp;#8221;, the data &amp;amp; information available to use in making these decisions is doubling every few months. It used to be that storage (cost) was the holdup, but now it is simply what some early adopters called &amp;#8220;data mining&amp;#8221;, which is a very poor way of going about it, but it is buzzword-worthy.&lt;/p&gt;
&lt;p&gt;So what would you do (on any of the 3 levels) if you had all the information you needed, but it was somewhere in a mass of data that has more words than have ever been written by all humans across all time, and is getting bigger every day? You would want only one thing, and that one thing is the target of anyone ahead of this curve:&lt;/p&gt;
&lt;p&gt;Making data into usable, &lt;em&gt;actionable&lt;/em&gt; information.&lt;/p&gt;
&lt;p&gt;If you didn&amp;#8217;t know this 2-3 years ago, you&amp;#8217;re already too late.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;pat&lt;/p&gt;
&lt;p&gt;:)&lt;/p&gt;
&lt;img src="http://blog.atcp.us/1be46b7c/d155e055/FeedBurner/1.0 (http://www.FeedBurner.com).gif" /&gt;&lt;div id="crp_related"&gt;&lt;h3&gt;Related Posts:&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2007/03/25/what-do-you-charge/" rel="bookmark" class="crp_title"&gt;What do you charge?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.salesadvisorypractice.com/2011/01/doesnt-talent-management-mean-firing.html" rel="bookmark" class="crp_title"&gt;Doesn&amp;#8217;t &amp;#8220;Talent Management&amp;#8221; Mean Firing Those who Under-Perform?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2010/09/02/why-sales-engineers-dont-belong-in-cubicles/" rel="bookmark" class="crp_title"&gt;Why Sales Engineers Don&amp;#8217;t Belong in Cubicles&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.salesadvisorypractice.com/2011/03/building-intelligent-sales-marketing.html" rel="bookmark" class="crp_title"&gt;Building the Intelligent Sales &amp;amp; Marketing Organization&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2011/04/25/social-media-and-the-workplace/" rel="bookmark" class="crp_title"&gt;Social Media and the Workplace&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;hr /&gt;&lt;small&gt;Copyright &amp;copy; 2008 Pat Trainor&lt;br /&gt; This feed is for personal, non-commercial use only. &lt;br /&gt; The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint: 42f5526b193bd8a1944599dd55b3a5f8 (209.85.224.85) )&lt;/small&gt;&lt;center&gt;&lt;/center&gt;Related ArticlesNo Related Post&lt;img src="http://feeds.feedburner.com/~r/atcpllc/~4/2Sb4xy19ApM" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://blog.atcp.us/2012/05/03/what-if-your-information-wish-came-true/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.atcp.us/2012/05/03/what-if-your-information-wish-came-true/</feedburner:origLink></item>
		<item>
		<title>How to Create a LastUpdated and GUID that Automatically Update</title>
		<link>http://feedproxy.google.com/~r/atcpllc/~3/fl32hmVSxT0/</link>
		<comments>http://blog.atcp.us/2011/11/02/how-to-create-a-lastupdated-and-guid-that-automatically-update/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 02:10:35 +0000</pubDate>
		<dc:creator>Bogus Exception</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[SysAdmin]]></category>

	<!-- AutoMeta Start -->
	<category>testing</category>
	<category>lastupdated  </category>
	<category>lastupdated</category>
	<category>lastupdated                           </category>
	<category>col1  </category>
	<category>col2  </category>
	<category>col1</category>
	<category>col1      </category>
	<category>testing</category>
	<category>lastupdated  </category>
	<category>lastupdated</category>
	<category>lastupdated                           </category>
	<category>col1  </category>
	<category>col2  </category>
	<category>col1</category>
	<category>col1      </category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.atcp.us/?p=3536</guid>
		<description>&lt;p&gt;I was looking for a way to have all my tables have a unique GUID (Globally Unique ID) &lt;em&gt;as well as &lt;/em&gt;a &amp;#8220;Last Updated&amp;#8221; column that would automatically update both on &lt;strong&gt;INSERT&lt;/strong&gt; and on &lt;strong&gt;UPDATE&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Through a few hours of experimentation, I created the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;CREATE TABLE dbo.testing
    (guid            uniqueidentifier    NOT NULL &lt;strong&gt;DEFAULT NEWID()&lt;/strong&gt;,
     lastUpdated     datetime2(7)        NOT NULL &lt;strong&gt;DEFAULT GETDATE()&lt;/strong&gt;,
     col1            nchar(10)           NULL,
     col2            nchar(10)           NULL)
GO
CREATE TRIGGER dbo.trLastUpdatedTesting
ON dbo.testing
AFTER &lt;strong&gt;UPDATE&lt;/strong&gt; -- not insert!
AS
BEGIN&lt;/pre&gt;
&lt;p&gt;&lt;span id="more-3536"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;
    IF NOT UPDATE(lastUpdated)
    BEGIN
        UPDATE t
            SET t.lastUpdated = CURRENT_TIMESTAMP
            FROM dbo.testing AS t -- not b!
            INNER JOIN inserted AS i
            ON t.guid = i.guid;
    END
END
GO
INSERT INTO dbo.testing ([col1], [col2]) VALUES ('one', '1')
GO
INSERT INTO dbo.testing ([col1], [col2]) VALUES ('two', '2')
GO
SELECT * FROM dbo.testing
GO
UPDATE dbo.testing SET col1 = 'ONE' WHERE col2 = '1'
GO
SELECT * FROM dbo.testing
GO
DROP TABLE testing
GO&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;I now add these functions to all my table templates.&lt;/p&gt;
&lt;p&gt;The good stuff is the &lt;strong&gt;TRIGGER&lt;/strong&gt; to keep my lastUpdated column updated, and the &lt;strong&gt;DEFAULT&lt;/strong&gt; settings of the &lt;strong&gt;guid&lt;/strong&gt; and &lt;strong&gt;lastUpdated&lt;/strong&gt; columns in the &lt;strong&gt;CREATE&lt;/strong&gt; statement. The &lt;strong&gt;DEFAULT&lt;/strong&gt; keywords only help for &lt;strong&gt;INSERTs&lt;/strong&gt;, which is why I had to also have the trigger.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;guid&lt;/strong&gt; never changes once created on &lt;strong&gt;INSERT&lt;/strong&gt;, but the &lt;strong&gt;guid&lt;/strong&gt; column has to be there for &lt;strong&gt;INSERT&lt;/strong&gt; and every subsequent &lt;strong&gt;UPDATE&lt;/strong&gt;. &lt;em&gt;Both&lt;/em&gt; are here in an easy to use example that you can run, and get:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;guid                                 lastUpdated                            col1       col2
------------------------------------ -------------------------------------- ---------- -----
09C02D9D-DF81-4C01-80D6-EEF644660C62            2011-11-02 18:55:03.3800000 one        1
685F7977-0DF2-4B44-8937-50A307069F0D            2011-11-02 18:55:03.4230000 two        2

(2 rows affected)
1&amp;gt; UPDATE dbo.testing SET col1 = 'ONE' WHERE col2 = '1'
2&amp;gt; GO

(1 rows affected)
1&amp;gt; SELECT * FROM dbo.testing
2&amp;gt; GO
guid                                 lastUpdated                            col1       col2
------------------------------------ -------------------------------------- ---------- -----
09C02D9D-DF81-4C01-80D6-EEF644660C62            &lt;strong&gt;2011-11-02 18:55:03.5230000&lt;/strong&gt;&lt;strong&gt; ONE&lt;/strong&gt;        1
685F7977-0DF2-4B44-8937-50A307069F0D            2011-11-02 18:55:03.4230000 two        2

(2 rows affected)&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Note the &lt;strong&gt;lastUpdated&lt;/strong&gt; column value before &amp;amp; after the &lt;strong&gt;UPDATE&lt;/strong&gt;. I hope this proof of concept helps you!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;MS SQL 2008 R2&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;pat&lt;/p&gt;
&lt;p&gt;:)&lt;/p&gt;
&lt;img src="http://blog.atcp.us/1be46b7c/d155e055/FeedBurner/1.0 (http://www.FeedBurner.com).gif" /&gt;&lt;div id="crp_related"&gt;&lt;h3&gt;Related Posts:&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2011/11/02/using-tsql-to-create-financial-technical-indicators-efficiently/" rel="bookmark" class="crp_title"&gt;Using TSQL to Create Financial Technical Indicators Efficiently&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2008/10/17/pacsafe-new-bag-and-blog-on-the-way/" rel="bookmark" class="crp_title"&gt;PacSafe &amp;#8211; New Bag, and Blog, on the way!&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2008/09/04/keeping-the-home-office-efficient/" rel="bookmark" class="crp_title"&gt;Keeping the Home Office Efficient!&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2011/08/14/adding-an-email-signature-in-gmail-with-rss/" rel="bookmark" class="crp_title"&gt;Adding an Email Signature in GMail with RSS&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2008/11/14/wtf-fidelity-an-open-letter/" rel="bookmark" class="crp_title"&gt;WTF Fidelity? An open letter&amp;#8230;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;hr /&gt;&lt;small&gt;Copyright &amp;copy; 2008 Pat Trainor&lt;br /&gt; This feed is for personal, non-commercial use only. &lt;br /&gt; The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint: 42f5526b193bd8a1944599dd55b3a5f8 (209.85.224.85) )&lt;/small&gt;&lt;center&gt;&lt;/center&gt;Related ArticlesNo Related Post&lt;img src="http://feeds.feedburner.com/~r/atcpllc/~4/fl32hmVSxT0" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://blog.atcp.us/2011/11/02/how-to-create-a-lastupdated-and-guid-that-automatically-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.atcp.us/2011/11/02/how-to-create-a-lastupdated-and-guid-that-automatically-update/</feedburner:origLink></item>
		<item>
		<title>Using TSQL to Create Financial Technical Indicators Efficiently</title>
		<link>http://feedproxy.google.com/~r/atcpllc/~3/_APBGerFnmw/</link>
		<comments>http://blog.atcp.us/2011/11/02/using-tsql-to-create-financial-technical-indicators-efficiently/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 01:51:20 +0000</pubDate>
		<dc:creator>Bogus Exception</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Statistics]]></category>

	<!-- AutoMeta Start -->
	<category>close_price</category>
	<category>quote_date</category>
	<category>quote_date  </category>
	<category>google_stock</category>
	<category>open_price</category>
	<category>high_price</category>
	<category>low_price</category>
	<category>values</category>
	<category>close_price</category>
	<category>quote_date</category>
	<category>quote_date  </category>
	<category>google_stock</category>
	<category>open_price</category>
	<category>high_price</category>
	<category>low_price</category>
	<category>values</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.atcp.us/?p=3532</guid>
		<description>&lt;p&gt;I am going through an exercise where I&amp;#8217;m trying to find a way to compute stock metrics (technical indicators). What I need is a way to iterate over the rows in a database, computing each technical indicator, then putting that value into the table&amp;#8217;s row for that date.&lt;/p&gt;
&lt;p&gt;I found an example, and modified it to work on SQL SERVER 2008 R2. I hope you, too, find this solution extremely interesting:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;DROP TABLE #google_stock
GO
create table #google_stock
(
quote_date [datetime],
open_price [decimal](6,2),
close_price [decimal](6,2),
high_price [decimal](6,2),
low_price [decimal](6,2)
)
GO&lt;/pre&gt;
&lt;p&gt;&lt;span id="more-3532"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091026', 555.75, 554.21, 561.64, 550.89)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091027', 550.97, 548.29, 554.56, 544.16)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091028', 547.87, 540.30, 550.00, 538.25)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091029', 543.01, 551.05, 551.83, 541.00)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091030', 550.00, 536.12, 550.17, 534.24)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091102', 537.08, 533.99, 539.46, 528.24)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091103', 530.01, 537.29, 537.50, 528.30)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091104', 540.80, 540.33, 545.50, 536.42)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091105', 543.49, 548.65, 549.77, 542.66)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091106', 547.72, 551.10, 551.78, 545.50)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091109', 555.45, 562.51, 562.58, 554.23)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091110', 562.73, 566.76, 568.78, 562.00)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091111', 570.48, 570.56, 573.50, 565.86)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091112', 569.56, 567.85, 572.90, 565.50)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091113', 569.29, 572.05, 572.51, 566.61)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091116', 575.00, 576.28, 576.99, 572.78)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091117', 574.87, 577.49, 577.50, 573.72)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091118', 576.65, 576.65, 578.78, 572.07)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091119', 573.77, 572.99, 574.00, 570.00)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091120', 569.50, 569.96, 571.60, 569.40)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091123', 576.49, 582.35, 586.60, 575.86)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091124', 582.52, 583.09, 584.29, 576.54)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091125', 586.41, 585.74, 587.06, 582.69)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091127', 572.00, 579.76, 582.46, 570.97)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091130', 580.63, 583.00, 583.67, 577.11)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091201', 588.13, 589.87, 591.22, 583.00)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091202', 591.00, 587.51, 593.01, 586.22)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091203', 589.04, 585.74, 591.45, 585.00)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091204', 593.02, 585.01, 594.83, 579.18)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091207', 584.21, 586.25, 588.69, 581.00)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091208', 583.50, 587.05, 590.66, 582.00)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091209', 587.50, 589.02, 589.33, 583.58)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091210', 590.44, 591.50, 594.71, 590.41)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091211', 594.68, 590.51, 594.75, 587.73)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091214', 595.35, 595.73, 597.31, 592.61)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091215', 593.30, 593.14, 596.38, 590.99)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091216', 598.60, 597.76, 600.37, 596.64)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091217', 596.44, 593.94, 597.64, 593.76)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091218', 596.03, 596.42, 598.93, 595.00)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091221', 597.61, 598.68, 599.84, 595.67)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091222', 601.34, 601.12, 601.50, 598.85)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091223', 603.50, 611.68, 612.87, 602.85)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091224', 612.93, 618.48, 619.52, 612.27)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091228', 621.66, 622.87, 625.99, 618.48)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091229', 624.74, 619.40, 624.84, 618.29)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091230', 618.50, 622.73, 622.73, 618.01)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20091231', 624.75, 619.98, 625.40, 619.98)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100104', 626.95, 626.75, 629.51, 624.24)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100105', 627.18, 623.99, 627.84, 621.54)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100106', 625.86, 608.26, 625.86, 606.36)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100107', 609.40, 594.10, 610.00, 592.65)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100108', 592.00, 602.02, 603.25, 589.11)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100111', 604.46, 601.11, 604.46, 594.04)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100112', 597.65, 590.48, 598.16, 588.00)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100113', 576.49, 587.09, 588.38, 573.90)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100114', 583.90, 589.85, 594.20, 582.81)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100115', 593.34, 580.00, 593.56, 578.04)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100119', 581.20, 587.62, 590.42, 576.29)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100120', 585.98, 580.41, 585.98, 575.29)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100121', 583.44, 582.98, 586.82, 572.25)
INSERT INTO #google_stock (quote_date, open_price, close_price, high_price, low_price) VALUES ('20100122', 564.50, 550.01, 570.60, 534.86)
GO
CREATE CLUSTERED INDEX ix_goog on #google_stock(quote_date)
GO
drop table #mod_goog_data
GO
with t1 as (select row_number() over (order by quote_date) n
    ,quote_date
    ,close_price
    from #google_stock)
    select a.n
       ,a.quote_date
       ,a.close_price
       ,CAST(null as decimal(8,2)) [sma]
       --add the close_price from 20 row prior to this one
       ,CAST(b.close_price as decimal(8,2)) [20_day_old_close]
    into #mod_goog_data
    from t1 a
        left join t1 b
        on a.n - 20 = b.n
GO        
declare @intervals int, @initial_sum decimal(8,2)
declare @anchor int, @moving_sum decimal(8,2)
set @intervals = 20

 --Retrieve the initial sum value at row 20
 select @initial_sum = sum(close_price)
    from #mod_goog_data
    where n &amp;lt;= @intervals

 update t1
    --case statement to handle @moving_sum variable
    --depending on the value of n
   set @moving_sum = case when n &amp;lt; @intervals then null
             when n = @intervals then @initial_sum
             when n &amp;gt; @intervals then
                        @moving_sum + [close_price] - [20_day_old_close]
             end,
    sma = @moving_sum/Cast(@intervals as decimal(8,2)),
    @anchor = n    --anchor so that carryover works
    from #mod_goog_data t1 with (TABLOCKX)
    OPTION (MAXDOP 1)
GO    
  select quote_date
   ,close_price
   ,sma from #mod_goog_data
GO&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;This produces this clean output in the temp table created:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;quote_date              close_price  sma
2009-10-26 00:00:00.000    554.21    NULL
2009-10-27 00:00:00.000    548.29    NULL
2009-10-28 00:00:00.000    540.30    NULL
2009-10-29 00:00:00.000    551.05    NULL
2009-10-30 00:00:00.000    536.12    NULL
2009-11-02 00:00:00.000    533.99    NULL
2009-11-03 00:00:00.000    537.29    NULL
2009-11-04 00:00:00.000    540.33    NULL
2009-11-05 00:00:00.000    548.65    NULL
2009-11-06 00:00:00.000    551.10    NULL
2009-11-09 00:00:00.000    562.51    NULL
2009-11-10 00:00:00.000    566.76    NULL
2009-11-11 00:00:00.000    570.56    NULL
2009-11-12 00:00:00.000    567.85    NULL
2009-11-13 00:00:00.000    572.05    NULL
2009-11-16 00:00:00.000    576.28    NULL
2009-11-17 00:00:00.000    577.49    NULL
2009-11-18 00:00:00.000    576.65    NULL
2009-11-19 00:00:00.000    572.99    NULL
2009-11-20 00:00:00.000    569.96    557.72
2009-11-23 00:00:00.000    582.35    559.13
2009-11-24 00:00:00.000    583.09    560.87
2009-11-25 00:00:00.000    585.74    563.14
2009-11-27 00:00:00.000    579.76    564.58
2009-11-30 00:00:00.000    583.00    566.92
2009-12-01 00:00:00.000    589.87    569.71
2009-12-02 00:00:00.000    587.51    572.23
2009-12-03 00:00:00.000    585.74    574.50
2009-12-04 00:00:00.000    585.01    576.31
2009-12-07 00:00:00.000    586.25    578.07
2009-12-08 00:00:00.000    587.05    579.30
2009-12-09 00:00:00.000    589.02    580.41
2009-12-10 00:00:00.000    591.50    581.46
2009-12-11 00:00:00.000    590.51    582.59
2009-12-14 00:00:00.000    595.73    583.78
2009-12-15 00:00:00.000    593.14    584.62
2009-12-16 00:00:00.000    597.76    585.63
2009-12-17 00:00:00.000    593.94    586.50
2009-12-18 00:00:00.000    596.42    587.67
2009-12-21 00:00:00.000    598.68    589.10
2009-12-22 00:00:00.000    601.12    590.04
2009-12-23 00:00:00.000    611.68    591.47
2009-12-24 00:00:00.000    618.48    593.11
2009-12-28 00:00:00.000    622.87    595.26
2009-12-29 00:00:00.000    619.40    597.08
2009-12-30 00:00:00.000    622.73    598.73
2009-12-31 00:00:00.000    619.98    600.35
2010-01-04 00:00:00.000    626.75    602.40
2010-01-05 00:00:00.000    623.99    604.35
2010-01-06 00:00:00.000    608.26    605.45
2010-01-07 00:00:00.000    594.10    605.80
2010-01-08 00:00:00.000    602.02    606.45
2010-01-11 00:00:00.000    601.11    606.93
2010-01-12 00:00:00.000    590.48    606.93
2010-01-13 00:00:00.000    587.09    606.50
2010-01-14 00:00:00.000    589.85    606.34
2010-01-15 00:00:00.000    580.00    605.45
2010-01-19 00:00:00.000    587.62    605.13
2010-01-20 00:00:00.000    580.41    604.33
2010-01-21 00:00:00.000    582.98    603.55
2010-01-22 00:00:00.000    550.01    600.99&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;And THAT is how its done!&lt;/p&gt;
&lt;img src="http://blog.atcp.us/1be46b7c/d155e055/FeedBurner/1.0 (http://www.FeedBurner.com).gif" /&gt;&lt;div id="crp_related"&gt;&lt;h3&gt;Related Posts:&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2011/11/02/how-to-create-a-lastupdated-and-guid-that-automatically-update/" rel="bookmark" class="crp_title"&gt;How to Create a LastUpdated and GUID that Automatically Update&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2008/10/17/pacsafe-new-bag-and-blog-on-the-way/" rel="bookmark" class="crp_title"&gt;PacSafe &amp;#8211; New Bag, and Blog, on the way!&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2009/11/19/where-should-i-eat/" rel="bookmark" class="crp_title"&gt;Where Should I Eat?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2009/11/19/everyone-smile/" rel="bookmark" class="crp_title"&gt;Everyone Smile!&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2009/11/19/the-periodic-table-of-cupcakes/" rel="bookmark" class="crp_title"&gt;The Periodic Table of Cupcakes&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;hr /&gt;&lt;small&gt;Copyright &amp;copy; 2008 Pat Trainor&lt;br /&gt; This feed is for personal, non-commercial use only. &lt;br /&gt; The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint: 42f5526b193bd8a1944599dd55b3a5f8 (209.85.224.85) )&lt;/small&gt;&lt;center&gt;&lt;/center&gt;Related ArticlesNo Related Post&lt;img src="http://feeds.feedburner.com/~r/atcpllc/~4/_APBGerFnmw" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://blog.atcp.us/2011/11/02/using-tsql-to-create-financial-technical-indicators-efficiently/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.atcp.us/2011/11/02/using-tsql-to-create-financial-technical-indicators-efficiently/</feedburner:origLink></item>
		<item>
		<title>Sales Engineering Mistakes</title>
		<link>http://feedproxy.google.com/~r/atcpllc/~3/XPCE13FOIYc/</link>
		<comments>http://blog.atcp.us/2011/10/29/sales-engineering-mistakes/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 18:29:30 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
				<category><![CDATA[Sales Engineering]]></category>

	<!-- AutoMeta Start -->
	<category>yawn</category>
	<category>demo</category>
	<category>demo</category>
	<category>yawn</category>
	<category>demo</category>
	<category>demo</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.atcp.us/?p=831</guid>
		<description>&lt;p&gt;A colleague turned me on to an article &lt;a href="http://www.openforum.com/idea-hub/topics/the-world/article/stunningly-awful-demos-five-things-not-to-do-in-a-demo-guy-kawasaki"&gt;here&lt;/a&gt; that talks about 5 &lt;em&gt;stunningly awful&lt;/em&gt; mistakes for demos. I don&amp;#8217;t think these are all that bad, and certainly not stunning, but I&amp;#8217;ll include the 5 here, as we have a few more practical ones to add after:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.atcp.us/wp-content/uploads/2009/10/apollo-attention-difficulties.png"&gt;&lt;img class="size-medium wp-image-833" title="apollo-attention-difficulties" src="http://blog.atcp.us/wp-content/uploads/2009/10/apollo-attention-difficulties-300x190.png" alt="apollo-attention-difficulties" width="240" height="152" align="right" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Misunderstand the customer&amp;#8217;s needs: Harbor Cruise&lt;/strong&gt; Don&amp;#8217;t make a demo in the hope that your customer will eventually see something of interest. Inexperienced salespeople often inflict these demos on their customers as a replacement for doing their homework. Jaded sales engineers offer these demos when they receive little or no pre-demo information from their sales colleagues. Do the research to figure out what your customers need in advance.&lt;span id="more-831"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Start with a corporate overview: Death by Corporate Overview&lt;/strong&gt; You should see a pattern developing here: Get right to it. Don&amp;#8217;t start the meeting with twenty minutes of corporate overview and by regaling your audience with your mission statement (yawn), company history (yawn), revenues, office locations, markets, products, and that smorgasbord of customer logos (yawn, yawn, yawn, snooze). This strategy ensures that the most important people leave before you can start the demo itself and everyone is bored when you do. Your corporate overview won&amp;#8217;t matter unless you suck the audience in with your demo.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Present a linear demo from beginning to end: In the Beginning  &lt;/strong&gt;Have you ever watched a demo and ten minutes into the process you find yourself wondering, &amp;#8220;Where is this going? What is he making? How does this apply to us?&amp;#8221; You can ensure the same awful fate for your customers by delivering long, linear demos that take forty or sixty minutes to reach the pay-off. The order of the day is to show a great result and then briefly show how easy it is to produce it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Do a feature dump: Here&amp;#8217;s Another Thing You Can Do &lt;/strong&gt; Want to make your software appear as confusing and complex as possible? Want to find more ways to bore and torture your audience? Want to reduce the price they pay for your software? It&amp;#8217;s easy: show as many features as you can! You shouldn&amp;#8217;t present your demo as if it&amp;#8217;s product training: &amp;#8220;Let me show you how to do this, that, and this other thing!&amp;#8221; Explaining all of the menus, tabs, navigation and customization capabilities is a sure way to inflict pain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Show the same demo: Everyone Loves This Feature&lt;/strong&gt; Don&amp;#8217;t ignore that the VPs who are potential customers only want a top-level overview and that the customer managers are interested only in their portion of the process. If you use the same demo no matter who&amp;#8217;s in the room, you will bore the senior customer participants, and they will leave early. You&amp;#8217;ll have done training for the end-users, but the training won&amp;#8217;t be necessary since you won&amp;#8217;t get the deal!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href="http://blog.atcp.us/wp-content/uploads/2009/10/Blog-8-Jul-09-PowerPoint.jpg"&gt;&lt;img class="size-medium wp-image-834" title="Blog 8 Jul 09 PowerPoint" src="http://blog.atcp.us/wp-content/uploads/2009/10/Blog-8-Jul-09-PowerPoint-300x207.jpg" alt="Blog 8 Jul 09 PowerPoint" width="300" height="207" align="left" /&gt;&lt;/a&gt;There are of course many more. The root of all them is unsurprisingly &lt;em&gt;communication&lt;/em&gt;. Or should I say, the &lt;em&gt;lack of communication&lt;/em&gt;. Every problem in a Sales Engineer&amp;#8217;s world can be broken down to this source.&lt;/p&gt;
&lt;p&gt;Last year I stayed up all night in a hotel in Kentucky trying to get my company&amp;#8217;s software to work. I had a demo that next morning, and it HAD to work, as the CEO had decided to micro-manage the meeting and was there in person for the demo. All night, what should have worked didn&amp;#8217;t, and I had nobody to call. Finally at 7:30am, sweating bullets, I called one of the DBAs on her cell.&lt;/p&gt;
&lt;p&gt;She knew immediately what it was: The new version I had installed had a new feature added that allowed users to select time periods where the software would not accept input. By default it was set to block from 9pm to 8am.&lt;/p&gt;
&lt;p&gt;The CEO complained that I looked tired, and I told him I was up all night. He yelled at me and I calmly stood there and took it. Underneath I was smiling, as I knew eventually he&amp;#8217;d know why I had stayed up all night, and realize it was his developers&amp;#8217; fault and not mine.&lt;/p&gt;
&lt;p&gt;So what would I add to the top 5?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Failure to prepare&lt;/strong&gt;. You only get one chance to make a first impression. No amount of explaining can make up for a failed/non-functioning demo.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Blame Management&lt;/strong&gt;. A term I coined back in 1992 while working in the casino industry. Make up your own definition, and you&amp;#8217;ll be very close.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qualification&lt;/strong&gt;. Don&amp;#8217;t rely on your account rep to ensure that you are being pushed in front of a qualified lead/opportunity. I&amp;#8217;ve discussed qualification &lt;a href="http://blog.atcp.us/2008/09/09/what-is-enterprise-sales/"&gt;here&lt;/a&gt;, &lt;a href="http://blog.atcp.us/2008/09/19/qualification-in-enterprise-software-sales/"&gt;here&lt;/a&gt; and &lt;a href="http://blog.atcp.us/2008/09/30/pilots-pocs-and-demos-oh-my/"&gt;here&lt;/a&gt;, among other articles on this blog.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Is it helping the deal close&lt;/strong&gt;? Along with qualification, this has to do with whether you are being asked to do a demo for the sake of a demo, or if it is a crucial/critical path component of closing the deal. &amp;#8220;If the demo illustrates the claims you&amp;#8217;ve made, then we&amp;#8217;ll buy it&amp;#8221; should be the kind of phrases/commitments you should see.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Never give a &amp;#8220;Generic Demo&amp;#8221;&lt;/strong&gt;. You are more likely to miss the mark when you guess. If you are talking to an insurance company, then talk about the insurance business and how the software assists folks in it. If the opportunity is large enough, throw together a mock PoC with their name and icons. Prospects &lt;em&gt;love&lt;/em&gt; to see their own name/logo.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use the right presentation medium&lt;/strong&gt;. If animations (flash) makes more sense for all/part of your pitch, then make it so. If handouts would help out, then add them-but for God&amp;#8217;s sake don&amp;#8217;t have one demo that you are comfortable with fit all occasions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Don&amp;#8217;t be a weather-man/weather-woman(?)&lt;/strong&gt;. Don&amp;#8217;t sit in front of an audience reading them what is written on the screen. Have you ever noticed that your local weatherperson(?) on TV points to a number, then tells you what it is? It is so degrading that I feel like I&amp;#8217;m a kindergartner. Instead,&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Engage the Audience&lt;/strong&gt;. This is the sign of a pro. You need to be able to work an audience by asking them what they do, tell them something about what they do, then apply their function into the presentation. Engage as many people as possible and you&amp;#8217;ll have a light, fun meeting that will virtually force the prospect to open up and tell you what you need to know.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I don&amp;#8217;t want to go on forever here. I just wanted to point out that there are far worse mistakes than the ones above in the cited article.&lt;/p&gt;
&lt;p&gt;pat&lt;/p&gt;
&lt;img src="http://blog.atcp.us/1be46b7c/d155e055/FeedBurner/1.0 (http://www.FeedBurner.com).gif" /&gt;&lt;div id="crp_related"&gt;&lt;h3&gt;Related Posts:&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2008/07/24/enterprise-sales-101-software-demos/" rel="bookmark" class="crp_title"&gt;Enterprise Sales 101 &amp;#8211; Software Demos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2008/09/30/pilots-pocs-and-demos-oh-my/" rel="bookmark" class="crp_title"&gt;Pilots, POCs and Demos&amp;#8230; Oh My!&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2008/09/09/what-is-enterprise-sales/" rel="bookmark" class="crp_title"&gt;What is &amp;#8220;Enterprise Sales&amp;#8221;?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://salesengineering.com/blog/2009/01/09/10-tips-for-ses-during-the-economic-winter/" rel="bookmark" class="crp_title"&gt;10 Tips for SEs During the Economic Winter&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2008/10/08/how-does-a-sales-engineer-improveenhance-the-deal/" rel="bookmark" class="crp_title"&gt;How Does a Sales Engineer Improve/Enhance the Deal?&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;hr /&gt;&lt;h2&gt;Comments&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2011/10/29/sales-engineering-mistakes/"&gt;November 4, 2009&lt;/a&gt;, &lt;a href='http://blog.atcp.us' rel='external nofollow' class='url'&gt;Pat Trainor&lt;/a&gt; writes: I had a sales call, or rather meeting, with/for a reseller we deal with a few days ago. I begged for days for any info on the situation, what features I'd demo, the whole solution landscape, everything-and got nothing.

As a result, I did as generic a demo as can be done. At the end of the meeting, the prospect handed the rep a stack of sample data for us to "prove" our claims. All fair.

I'm not even back in the office, and I'm told the call bombed and we're out of the running. WTF? The rep wouldn't cite details (of course), but I've got a suspicion it was the gum chewing and (mild) talking down to the prospect. I call it &lt;i&gt;talking to your prospects like they were your plants/pets&lt;/i&gt;. Nice. So now the VP of Sales (my boss) thinks I blew the call.

So if this were really true, then why at the end of the meting did the prospect give up materials for us to return with, in a more customized demo ("show me my data in your software")?

One of my sayings is: &lt;i&gt;If a demo was able to kill a deal, then the deal was not qualified (properly)&lt;/i&gt;.

This is one of those times (and I've got a whole chapter devoted to this phenomenon) where a Sales Engineer is vulnerable. We usually have no signing authority or staff, and as such can be the scapegoat for the failure of others.

Interesting circumstances, though, no?

pat
:)&lt;/li&gt;&lt;/ul&gt;&lt;hr /&gt;&lt;small&gt;Copyright &amp;copy; 2008 Pat Trainor&lt;br /&gt; This feed is for personal, non-commercial use only. &lt;br /&gt; The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint: 42f5526b193bd8a1944599dd55b3a5f8 (209.85.224.85) )&lt;/small&gt;&lt;center&gt;&lt;/center&gt;Related ArticlesNo Related Post&lt;img src="http://feeds.feedburner.com/~r/atcpllc/~4/XPCE13FOIYc" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://blog.atcp.us/2011/10/29/sales-engineering-mistakes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.atcp.us/2011/10/29/sales-engineering-mistakes/</feedburner:origLink></item>
		<item>
		<title>Adding an Email Signature in GMail with RSS</title>
		<link>http://feedproxy.google.com/~r/atcpllc/~3/yqbdwfoXrQk/</link>
		<comments>http://blog.atcp.us/2011/08/14/adding-an-email-signature-in-gmail-with-rss/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 21:23:58 +0000</pubDate>
		<dc:creator>Pat</dc:creator>
				<category><![CDATA[Prog]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Technology]]></category>

	<!-- AutoMeta Start -->
	<category>women</category>
	<category>women</category>
	<category>coulter</category>
	<category>feed</category>
	<category>sigs</category>
	<category>wisestamp</category>
	<category>signature</category>
	<category>women</category>
	<category>women</category>
	<category>coulter</category>
	<category>feed</category>
	<category>sigs</category>
	<category>wisestamp</category>
	<category>signature</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.atcp.us/?p=3049</guid>
		<description>&lt;p&gt;GMail recently took away the ability to have an RSS feed create signatures for us. Luckily I&amp;#8217;ve been using Wisestamp (&lt;a href="http://www.wisestamp.com"&gt;http://www.wisestamp.com&lt;/a&gt;) for years, and it is just the thing you need. With it, you can take the output of any RSS feed and put the text at the bottom of your signature in every email you send out.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.atcp.us/wp-content/uploads/2011/08/Screenshot_449.jpg"&gt;&lt;img class="aligncenter size-medium wp-image-3050" title="Screenshot_449" src="http://blog.atcp.us/wp-content/uploads/2011/08/Screenshot_449-300x143.jpg" alt="" width="300" height="143" /&gt;http://blog.atcp.us/wp-admin/post.php?post=3049&amp;amp;action=edit&amp;amp;message=1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Above, I&amp;#8217;ve created a simple signature in Wisestamp, and when you do this in the editor, you have some really diverse choices below.&lt;span id="more-3049"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.atcp.us/wp-content/uploads/2011/08/Screenshot_451.jpg"&gt;&lt;img class="aligncenter size-medium wp-image-3052" title="Screenshot_451" src="http://blog.atcp.us/wp-content/uploads/2011/08/Screenshot_451-300x164.jpg" alt="" width="300" height="164" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The one we&amp;#8217;re interested in is the one simply called &lt;strong&gt;RSS&lt;/strong&gt;. To bring RSS articles into your signature, you simply put the URL of the feed in. You don&amp;#8217;t even need a title:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.atcp.us/wp-content/uploads/2011/08/Screenshot_453.jpg"&gt;&lt;img class="aligncenter size-medium wp-image-3053" title="Screenshot_453" src="http://blog.atcp.us/wp-content/uploads/2011/08/Screenshot_453-300x149.jpg" alt="" width="300" height="149" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here, I just pointed toward a perl script. Why? Because we&amp;#8217;re going to roll our own RSS feed for GMail! It&amp;#8217;s a lot easier than you think, and we won&amp;#8217;t need anything else but what perl comes with naturally.&lt;/p&gt;
&lt;p&gt;We do this in 2 files:&lt;/p&gt;
&lt;p&gt;- A &lt;a href="http://atcp.us/sigs/quoteFile" target="_blank"&gt;&lt;em&gt;quoteFile&lt;/em&gt;&lt;/a&gt; (which will hold each quote, one per line)&lt;/p&gt;
&lt;p&gt;- A perl script (&lt;a href="http://atcp.us/sigs/sigv2.pl" target="_blank"&gt;&lt;em&gt;sigv2.pl&lt;/em&gt;&lt;/a&gt;) to call from our signature application (that will serve up a random RSS article from the above file)&lt;/p&gt;
&lt;p&gt;So, in any account you have access to a shell in, create a file of any name, and have your quotes in it-one per line (below is wrapping, obviously):&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&amp;#8220;It may be a blessing in disguise. &amp;#8230; Something happened a long time ago in Haiti, and people might not want to talk about it. Haitians were originally under the heel of the French. You know, Napoleon the third, or whatever. And they got together and swore a pact to the devil. They said, we will serve you if you will get us free from the French. True story. And so, the devil said, okay it&amp;#8217;s a deal. Ever since they have been cursed by one thing after the other.&amp;#8221; -Pat Robertson, on the earthquake in Haiti that destroyed the capital and killed tens of thousands of people, Jan. 13, 2010&lt;br /&gt;
&amp;#8220;I&amp;#8217;m a huge supporter of women. What I&amp;#8217;m not is a supporter of liberalism. Feminism is what I oppose. Feminism has led women astray. I love the women&amp;#8217;s movement-especially when walking behind it.&amp;#8221; -Rush Limbaugh, responding to criticism that he is sexist and defending his selection as one of the judges at the 2010 Miss America Pageant, &amp;#8220;Fox News&amp;#8217; Fox &amp;amp; Friends&amp;#8221;, February 3, 2010&lt;br /&gt;
&amp;#8220;Marriage is not a civil right. You&amp;#8217;re not black.&amp;#8221; -Ann Coulter, arguing in front of a group of gay conservatives that the 14th Amendment only applies to African-Americans and that it does not, in fact, apply to women, LGBT people, or other  minorities, Sept. 26, 2010&lt;br /&gt;
&amp;#8220;[Canadians] better hope the United States does not roll over one night and crush them. They are lucky we allow them to exist on the same continent.&amp;#8221; -Ann Coulter, on Fox News, November 30, 2004&lt;br /&gt;
Ann Coulter: &amp;#8220;You will find liberals always rooting for savages against civilization.&amp;#8221; Bill O&amp;#8217;Reilly: &amp;#8220;They didn&amp;#8217;t root for the Nazis against civilization.&amp;#8221;Coulter: &amp;#8220;Oh yes they did. It was only when Hitler invaded their precious Soviet Union that at the last minute they came in and suddenly started saying,  &amp;#8216;Oh no, now you have to fight Hitler.&amp;#8217;&amp;#8221; -&amp;#8217;The O&amp;#8217;Reilly Factor&amp;#8217; May 7, 2010&lt;br /&gt;
&amp;#8220;I think [women] should be armed but should not vote&amp;#8230;women have no capacity to understand how money is earned. They have a lot of ideas on how to spend it&amp;#8230;it&amp;#8217;s always more money on education, more money on child care, more money on day care.&amp;#8221; -Ann Coulter, on &amp;#8220;Politically Incorrect&amp;#8221; February 26, 2001&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Now all we need is the second part. Just write a simple Perl script (executable by your web server&amp;#8217;s user) to serve up quotes from the above file just like a well behaved RSS feed:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;#!/usr/local/bin/perl&lt;br /&gt;
#&lt;br /&gt;
# just call like any other RSS feed&amp;#8230;&lt;br /&gt;
#&lt;br /&gt;
#####&lt;br /&gt;
#&lt;br /&gt;
# a home-grown RSS feed!&lt;br /&gt;
#&lt;br /&gt;
my $f;          # the entire message from this feed&lt;br /&gt;
my @sigs;&lt;br /&gt;
open(SIGS, &amp;#8220;&amp;lt; quoteFile&amp;#8221;) or die &amp;#8220;Can&amp;#8217;t open file&amp;#8221;;&lt;br /&gt;
while(&amp;lt;SIGS&amp;gt;){&lt;br /&gt;
chomp;&lt;br /&gt;
push(@sigs, $_);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;my $i = int(rand(scalar @sigs));&lt;br /&gt;
my $sig = $sigs[$i];&lt;br /&gt;
#&lt;br /&gt;
#####&lt;br /&gt;
#&lt;br /&gt;
# now for the RSS part that will serve the chosen quote from above&lt;br /&gt;
#&lt;br /&gt;
$f = &amp;#8220;Content-type: application/rss+xml\n\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;?xml version=\&amp;#8221;1.0\&amp;#8221; encoding=\&amp;#8221;utf-8\&amp;#8221;?&amp;gt;&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;rss version=\&amp;#8221;2.0\&amp;#8221; xmlns:atom=\&amp;#8221;http://www.w3.org/2005/Atom\&amp;#8221;&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;channel&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;atom:link href=\&amp;#8221;http://atcp.us/sigs/test1.pl\&amp;#8221; rel=\&amp;#8221;self\&amp;#8221; type=\&amp;#8221;application/rss+xml\&amp;#8221; /&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;title&amp;gt;The title of my RSS 2.0 Feed&amp;lt;/title&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;link&amp;gt;http://linkedin.com/in/PatTrainor&amp;lt;/link&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;description&amp;gt;Now you understand my humor&amp;#8230;&amp;lt;/description&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;lastBuildDate&amp;gt;Mon, 12 Sep 2015 18:37:00 GMT&amp;lt;/lastBuildDate&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;language&amp;gt;en-us&amp;lt;/language&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;item&amp;gt;\n&amp;#8221;;&lt;br /&gt;
#&lt;br /&gt;
# this next line is what will show up in the Wisestamp signature for this RSS feeed:&lt;br /&gt;
#&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;title&amp;gt;&amp;#8221; . $sig . &amp;#8220;&amp;lt;/title&amp;gt;\n&amp;#8221;;&lt;br /&gt;
#&lt;br /&gt;
#####&lt;br /&gt;
#&lt;br /&gt;
# if they click the title (above), they will go to the URL below:&lt;br /&gt;
#&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;link&amp;gt;http://linkedin.com/in/PatTrainor&amp;lt;/link&amp;gt;\n&amp;#8221;;&lt;br /&gt;
#&lt;br /&gt;
#####&lt;br /&gt;
#&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;guid&amp;gt;http://linkedin.com/in/PatTrainor&amp;lt;/guid&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;pubDate&amp;gt;Mon, 12 Sep 2015 18:37:00 GMT&amp;lt;/pubDate&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;description&amp;gt;[CDATA[ This is the description. ]]&amp;lt;/description&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;/item&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;/channel&amp;gt;\n&amp;#8221;;&lt;br /&gt;
$f .= &amp;#8220;&amp;lt;/rss&amp;gt;\n&amp;#8221;;&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
print $f . &amp;#8220;\n&amp;#8221;;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;[puzzle: can you see from the below where the user is taken that clicks on the quote?]&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So now you see how to make a simple RSS feed out of thin air. Not only that, but you can make it say what you like, and even bring the user/client somewhere when they click the link. As a result, my signature looks like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.atcp.us/wp-content/uploads/2011/08/Screenshot_454.jpg"&gt;&lt;img class="aligncenter size-medium wp-image-3055" title="Screenshot_454" src="http://blog.atcp.us/wp-content/uploads/2011/08/Screenshot_454-300x165.jpg" alt="" width="300" height="165" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And that is how you make your very own RSS feed from a single Perl script, that also gives you a random &amp;#8216;&lt;em&gt;article&lt;/em&gt;&amp;#8216; whenever you hit it, suitable for Wisestamp to include in your GMail (or other email systems Wisestamp supports) account.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.atcp.us/wp-content/uploads/2011/08/Screenshot_455.jpg"&gt;&lt;img class="aligncenter size-medium wp-image-3056" title="Screenshot_455" src="http://blog.atcp.us/wp-content/uploads/2011/08/Screenshot_455-300x72.jpg" alt="" width="300" height="72" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Remember, you can use a script like this to template your very own RSS feed, feeding up any kind of data you like-on demand! Pretty nifty stuff, and perhaps even &lt;em&gt;useful&lt;/em&gt;!&lt;/p&gt;
&lt;p&gt;pat&lt;/p&gt;
&lt;p&gt;P.S. Since you held on this long, here is a treat for you. My online Perl script is &lt;a href="http://atcp.us/sigs/sigv2.pl" target="_blank"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;, and my quote file grows all the time, with the latest version &lt;a href="http://atcp.us/sigs/quoteFile" target="_blank"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;img src="http://blog.atcp.us/1be46b7c/d155e055/FeedBurner/1.0 (http://www.FeedBurner.com).gif" /&gt;&lt;div id="crp_related"&gt;&lt;h3&gt;Related Posts:&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2011/03/27/sun-tzu-and-information-warfare/" rel="bookmark" class="crp_title"&gt;Sun Tzu and Information Warfare&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2008/11/18/gmails-labels-can-act-like-folders-but-dont-tell-anybody/" rel="bookmark" class="crp_title"&gt;Gmail&amp;#8217;s &amp;#8220;Labels&amp;#8221; can act like &amp;#8220;Folders&amp;#8221;! (but don&amp;#8217;t tell anybody)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2010/03/27/thanks-terrorists/" rel="bookmark" class="crp_title"&gt;Thanks, Terrorists!&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2011/02/14/my-career-path-according-to-monster-com/" rel="bookmark" class="crp_title"&gt;My Career Path, According to Monster.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.atcp.us/2008/10/14/pacsafe-straps-for-camera-and-bag/" rel="bookmark" class="crp_title"&gt;PacSafe Straps for Camera and Bag&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;hr /&gt;&lt;small&gt;Copyright &amp;copy; 2008 Pat Trainor&lt;br /&gt; This feed is for personal, non-commercial use only. &lt;br /&gt; The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint: 42f5526b193bd8a1944599dd55b3a5f8 (209.85.224.85) )&lt;/small&gt;&lt;center&gt;&lt;/center&gt;Related ArticlesNo Related Post&lt;img src="http://feeds.feedburner.com/~r/atcpllc/~4/yqbdwfoXrQk" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://blog.atcp.us/2011/08/14/adding-an-email-signature-in-gmail-with-rss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.atcp.us/2011/08/14/adding-an-email-signature-in-gmail-with-rss/</feedburner:origLink></item>
	</channel>
</rss>

