<?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>Foster Solutions (FSI)</title>
	<atom:link href="http://www.fostersolutions.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fostersolutions.com</link>
	<description>The Solution is in the Process</description>
	<lastBuildDate>Sun, 29 Jan 2012 14:01:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<div id='fb-root'></div>
					<script type='text/javascript'>
						window.fbAsyncInit = function()
						{
							FB.init({appId: null, status: true, cookie: true, xfbml: true});
						};
						(function()
						{
							var e = document.createElement('script'); e.async = true;
							e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
							document.getElementById('fb-root').appendChild(e);
						}());
					</script>	
						<item>
		<title>Francesca Stanfill &#8211; Author</title>
		<link>http://www.fostersolutions.com/2012/01/francesca-stanfill-author/</link>
		<comments>http://www.fostersolutions.com/2012/01/francesca-stanfill-author/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 14:01:38 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Boutique sites]]></category>
		<category><![CDATA[Genesis Framework]]></category>
		<category><![CDATA[Recent Launches]]></category>
		<category><![CDATA[WordPress CMS]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://www.fostersolutions.com/?p=1844</guid>
		<description><![CDATA[Francesca Stanfill is a published author who needed her website migrated to a CMS, so she can write and edit on her own website. Her site was &#8220;rebuilt&#8221; to look as it did but on a WordPress / Genesis platform. FSI is also consulting on a strategy to work with online publishing and social media.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fostersolutions.com/2012/01/francesca-stanfill-author/francesca-stanfill-screensh/" rel="attachment wp-att-1845"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="alignleft size-medium wp-image-1845" title="francesca-stanfil" src="http://www.fostersolutions.com/wp-content/uploads/francesca-stanfill-screensh-300x213.jpg" alt="" width="300" height="213" /></a> <a href="http://francescastanfill.com">Francesca Stanfill</a> is a published author who needed her website migrated to a CMS, so she can write and edit on her own website.</p>
<p>Her site was &#8220;rebuilt&#8221; to look as it did but on a WordPress / Genesis platform.</p>
<p>FSI is also consulting on a strategy to work with online publishing and social media.</p>
<div class='wpfblike' ><fb:like href='http://www.fostersolutions.com/2012/01/francesca-stanfill-author/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
			<wfw:commentRss>http://www.fostersolutions.com/2012/01/francesca-stanfill-author/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To Push or Pull between your Website and FaceBook/Twitter</title>
		<link>http://www.fostersolutions.com/2012/01/to-push-or-pull-between-your-website-and-facebooktwitter/</link>
		<comments>http://www.fostersolutions.com/2012/01/to-push-or-pull-between-your-website-and-facebooktwitter/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 21:11:24 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[SEO/Marketing]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://www.fostersolutions.com/?p=1838</guid>
		<description><![CDATA[It has become mandatory to use Facebook and Twitter as part of your website marketing strategy.  The development environment for both Facebook and Twitter is finally getting to a point to allow good integration among the various platforms. This can be a formidable task for the developer/consultant as well as the client to understand how [...]]]></description>
			<content:encoded><![CDATA[<p>It has become mandatory to use Facebook and Twitter as part of your website marketing strategy.  The development environment for both Facebook and Twitter is finally getting to a point to allow good integration among the various platforms.</p>
<p>This can be a formidable task for the developer/consultant as well as the client to understand how the platforms all tie into a marketing strategy.</p>
<p>Except for large project, we develop exclusively on WordPress for websites, and fortunately there are some great plugins to easily (almost) set up a way to PUSH or PULL content between your website and FaceBook Page and Twitter account.  The client may want to post their content on all platforms separately, but this is burdensome for most.  It is more likely they will want to post on one platform primarily and have it disseminate to the others automatically.</p>
<p>The first question is to ask where the client feels most comfortable publishing content.  If the spend their day on Facebook, then the solution is better to pull content from Facebook to the website.  A good plugin for this is <a href="http://www.dolcebita.com/wordpress/facebook-like-box/" target="_blank">Facebook Like Box</a>.  This will add a like button, photo gallery and the posts as a widget.</p>
<p>To pull tweets I depend on Genesis &#8211; Latest Tweets.  We develop all our sites on the Genesis Framework and this is one of many great plugins included.</p>
<p>If the client wants to publish on their website, they will want to PUSH their data to both FB and Twitter.  I recommend <a href="http://www.joedolson.com/articles/wp-to-twitter/" target="_blank">WP-To-Twitter</a> and <a href="http://wordpress.org/extend/plugins/facebook-page-publish/" target="_blank">Facebook-page-publish</a> for these tasks (also Wordbooker).  To accomplish both of these tasks, you will need to establish an application.</p>
<div class='wpfblike' ><fb:like href='http://www.fostersolutions.com/2012/01/to-push-or-pull-between-your-website-and-facebooktwitter/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
			<wfw:commentRss>http://www.fostersolutions.com/2012/01/to-push-or-pull-between-your-website-and-facebooktwitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Foster Custom Kitchens</title>
		<link>http://www.fostersolutions.com/2012/01/foster-custom-kitchens/</link>
		<comments>http://www.fostersolutions.com/2012/01/foster-custom-kitchens/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 18:38:39 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Client Websites]]></category>
		<category><![CDATA[Genesis Framework]]></category>
		<category><![CDATA[Recent Launches]]></category>
		<category><![CDATA[WordPress CMS]]></category>

		<guid isPermaLink="false">http://www.fostersolutions.com/?p=1832</guid>
		<description><![CDATA[Foster Custom Kitchens helps its clients design, build and install high end kitchens, baths and cabinets in all parts of the house.  It also has commercial clients. FSI built its landing page and is in process of completing a completely new website using the Genesis framework for WordPress. P.S.  Yes, the name is no coincidence.  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fostersolutions.com/2012/01/foster-custom-kitchens/foster-custom-kitchens-scre/" rel="attachment wp-att-1833"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="alignleft size-medium wp-image-1833" title="foster-custom-kitchens" src="http://www.fostersolutions.com/wp-content/uploads/foster-custom-kitchens-scre-300x256.jpg" alt="" width="300" height="256" /></a><a href="http://www.fostercustomkitchens.com">Foster Custom Kitchens</a> helps its clients design, build and install high end kitchens, baths and cabinets in all parts of the house.  It also has commercial clients.</p>
<p>FSI built its landing page and is in process of completing a completely new website using the Genesis framework for WordPress.</p>
<p>P.S.  Yes, the name is no coincidence.  This is my brother&#8217;s company.</p>
<div class='wpfblike' ><fb:like href='http://www.fostersolutions.com/2012/01/foster-custom-kitchens/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
			<wfw:commentRss>http://www.fostersolutions.com/2012/01/foster-custom-kitchens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experts Exchange &#8212; Your online staff</title>
		<link>http://www.fostersolutions.com/2011/11/experts-exchange-your-online-staff/</link>
		<comments>http://www.fostersolutions.com/2011/11/experts-exchange-your-online-staff/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 20:05:24 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.fostersolutions.com/?p=1823</guid>
		<description><![CDATA[Experts Exchange is a great service where you can post your programming issue and you will more likely get a quick and professional response.  You can either earn points by answering other questions or you can pay a monthly fee. This is the best service I&#8217;ve seen by far and I have been using it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://beta.experts-exchange.com" title="Check out the New Experts Exchange" style="border:0;display:block;width:200px;height:50px;padding:0;margin:0;"><br />
<img src="http://c746246.r46.cf2.rackcdn.com/eebeta-badge-small.png" alt="Small Experts Exchange VIP Badge" style="border:0;" width="200" height="50" /><br />
</a><br />
Experts Exchange is a great service where you can post your programming issue and you will more likely get a quick and professional response.  You can either earn points by answering other questions or you can pay a monthly fee.</p>
<p>This is the best service I&#8217;ve seen by far and I have been using it for years.  It has paid for itself many times over by saving me time when I&#8217;ve been stumped.</p>
<p>They also have a new look and feel.  Check it out by clicking on the pic at the top.</p>
<div class='wpfblike' ><fb:like href='http://www.fostersolutions.com/2011/11/experts-exchange-your-online-staff/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
			<wfw:commentRss>http://www.fostersolutions.com/2011/11/experts-exchange-your-online-staff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MarkNet Group</title>
		<link>http://www.fostersolutions.com/2011/10/marknet-group/</link>
		<comments>http://www.fostersolutions.com/2011/10/marknet-group/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 18:28:34 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[FSI Partners]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.fostersolutions.com/?p=1813</guid>
		<description><![CDATA[FSI partners with The MarkNet Group to build small and medium sized websites based on the Genesis Framework for WordPress. The MarkNet group has a team of more than 10 programmers that can build scalable websites, with strong graphic design skills and SEO expertise.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fostersolutions.com/2011/10/marknet-group/marknet-group/" rel="attachment wp-att-1814"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="alignleft size-medium wp-image-1814" title="marknet-group" src="http://www.fostersolutions.com/wp-content/uploads/marknet-group-300x212.jpg" alt="" width="300" height="212" /></a>FSI partners with <a href="http://marknetgroup.com/" target="_blank">The MarkNet Group</a> to build small and medium sized websites based on the Genesis Framework for WordPress.</p>
<p>The MarkNet group has a team of more than 10 programmers that can build scalable websites, with strong graphic design skills and SEO expertise.</p>
<div class='wpfblike' ><fb:like href='http://www.fostersolutions.com/2011/10/marknet-group/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
			<wfw:commentRss>http://www.fostersolutions.com/2011/10/marknet-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Image floats not breaking for next listing</title>
		<link>http://www.fostersolutions.com/2011/10/wordpress-image-floats-not-breaking-for-next-listing/</link>
		<comments>http://www.fostersolutions.com/2011/10/wordpress-image-floats-not-breaking-for-next-listing/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 12:17:48 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.fostersolutions.com/?p=1809</guid>
		<description><![CDATA[If images are float left on a listing/blog page and the next item doesn&#8217;t break below the image but continues to wrap around it, you need to add a float:left and clear: both to a class in the style.css. &#160; See below &#160; #featured-bottom .featuredpost .post, #featured-bottom .featuredpage .page { margin: 0 0 10px 0; [...]]]></description>
			<content:encoded><![CDATA[<p>If images are float left on a listing/blog page and the next item doesn&#8217;t break below the image but continues to wrap around it, you need to add a float:left and clear: both to a class in the style.css.</p>
<p>&nbsp;</p>
<p>See below</p>
<p>&nbsp;</p>
<p>#featured-bottom .featuredpost .post, #featured-bottom .featuredpage .page {<br />
margin: 0 0 10px 0;<br />
padding: 10px 0 15px 0;<br />
border-bottom: 1px solid #333333;<br />
<strong>    float: left; </strong><br />
<strong>    clear: both;</strong><br />
}</p>
<div class='wpfblike' ><fb:like href='http://www.fostersolutions.com/2011/10/wordpress-image-floats-not-breaking-for-next-listing/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
			<wfw:commentRss>http://www.fostersolutions.com/2011/10/wordpress-image-floats-not-breaking-for-next-listing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embracing Your Life</title>
		<link>http://www.fostersolutions.com/2011/09/embracing-your-life/</link>
		<comments>http://www.fostersolutions.com/2011/09/embracing-your-life/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 02:01:56 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Genesis Framework]]></category>
		<category><![CDATA[Quick and Dirty sites]]></category>
		<category><![CDATA[Recent Launches]]></category>
		<category><![CDATA[WordPress CMS]]></category>

		<guid isPermaLink="false">http://www.fostersolutions.com/?p=1803</guid>
		<description><![CDATA[Embracing your Life is an illustrated book by award winning Jenny Vainisi. FSI built the site in WordPress using the Genesis framework and the Prose child theme as a foundation. The site includes a slider showing sample pages and Jenny&#8217;s beautiful artwork.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fostersolutions.com/2011/09/embracing-your-life/embracingyourlife-screensho/" rel="attachment wp-att-1804"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="alignleft size-medium wp-image-1804" title="embracingyourlife-screensho" src="http://www.fostersolutions.com/wp-content/uploads/embracingyourlife-screensho-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://embracingyourlifebook.com/" target="_blank">Embracing your Life</a> is an illustrated book by award winning Jenny Vainisi.</p>
<p>FSI built the site in WordPress using the Genesis framework and the Prose child theme as a foundation.</p>
<p>The site includes a slider showing sample pages and Jenny&#8217;s beautiful artwork.</p>
<div class='wpfblike' ><fb:like href='http://www.fostersolutions.com/2011/09/embracing-your-life/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
			<wfw:commentRss>http://www.fostersolutions.com/2011/09/embracing-your-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gravity Forms worth the money for WordPress surveys</title>
		<link>http://www.fostersolutions.com/2011/09/gravity-forms-worth-the-money-for-wordpress-surveys/</link>
		<comments>http://www.fostersolutions.com/2011/09/gravity-forms-worth-the-money-for-wordpress-surveys/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 21:08:52 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://www.fostersolutions.com/?p=1796</guid>
		<description><![CDATA[Gravity forms is a plugin for WordPress to build forms for surveys and mailings.  It isn&#8217;t free, but well worth the price as a very well designed product.   If  you are in the business of building websites, you inevitably will be needing to have at least a contact form on each of your sites, and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fostersolutions.com/2011/09/gravity-forms-worth-the-money-for-wordpress-surveys/gravity-forms/" rel="attachment wp-att-1797"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="alignleft size-medium wp-image-1797" title="gravity-forms" src="http://www.fostersolutions.com/wp-content/uploads/gravity-forms-300x238.jpg" alt="" width="300" height="238" /></a>Gravity forms is a plugin for WordPress to build forms for surveys and mailings.  It isn&#8217;t free, but well worth the price as a very well designed product.   If  you are in the business of building websites, you inevitably will be needing to have at least a contact form on each of your sites, and having a consistent plugin on all your sites is invaluable.</p>
<p>Gravity will create a couple tables and allows you to easily view all form submissions and export to Excel.  You can very quickly build forms with pull down menus, radio buttons, CAPTCHA, auto responders and many other advanced features.</p>
<p>The developer&#8217;s version will cost you $199, which is a bit pricey, but allows you to use it on unlimited sites.</p>
<div class='wpfblike' ><fb:like href='http://www.fostersolutions.com/2011/09/gravity-forms-worth-the-money-for-wordpress-surveys/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
			<wfw:commentRss>http://www.fostersolutions.com/2011/09/gravity-forms-worth-the-money-for-wordpress-surveys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Angels In Design</title>
		<link>http://www.fostersolutions.com/2011/09/angels-in-design/</link>
		<comments>http://www.fostersolutions.com/2011/09/angels-in-design/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 14:23:39 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Genesis Framework]]></category>
		<category><![CDATA[Quick and Dirty sites]]></category>
		<category><![CDATA[Recent Launches]]></category>
		<category><![CDATA[WordPress CMS]]></category>

		<guid isPermaLink="false">http://www.fostersolutions.com/?p=1791</guid>
		<description><![CDATA[Angels in Design is a new business that needed a high-end but affordable website. Foster Solutions used StudioPress&#8217; Genesis framework to build an elegant site with a dynamic feature image with text and other features such as gravity forms. FSI partnered with premier designer Jenny Vainisi for the logo and supporting graphic items.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fostersolutions.com/2011/09/angels-in-design/angels-in-design/" rel="attachment wp-att-1792"><img style=' float: left; padding: 4px; margin: 0 7px 2px 0;'  class="alignleft size-medium wp-image-1792" title="angels-in-design" src="http://www.fostersolutions.com/wp-content/uploads/angels-in-design-300x231.jpg" alt="" width="300" height="231" /></a><a href="http://www.angelsindesign.com/" target="_blank">Angels in Design</a> is a new business that needed a high-end but affordable website.</p>
<p>Foster Solutions used StudioPress&#8217; Genesis framework to build an elegant site with a dynamic feature image with text and other features such as gravity forms.</p>
<p>FSI partnered with premier designer <a href="http://jennyvainisi.com" target="_blank">Jenny Vainisi</a> for the logo and supporting graphic items.</p>
<div class='wpfblike' ><fb:like href='http://www.fostersolutions.com/2011/09/angels-in-design/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
			<wfw:commentRss>http://www.fostersolutions.com/2011/09/angels-in-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Function to Parse Names</title>
		<link>http://www.fostersolutions.com/2011/08/parsing-names-sql-server/</link>
		<comments>http://www.fostersolutions.com/2011/08/parsing-names-sql-server/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 17:14:20 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.fostersolutions.com/?p=1782</guid>
		<description><![CDATA[Parsing names is an age-old process of taking a full name (i.e. &#8220;Mr. John C. Smith, Jr.&#8221;) and extracting the first name, last name, middle name, etc. The following SQL Server function handles 99% of the situations, including prefixes, suffixes and hyphenated names.  It will get tripped up with two first names, but that is [...]]]></description>
			<content:encoded><![CDATA[<p>Parsing names is an age-old process of taking a full name (i.e. &#8220;Mr. John C. Smith, Jr.&#8221;) and extracting the first name, last name, middle name, etc.</p>
<p>The following SQL Server function handles 99% of the situations, including prefixes, suffixes and hyphenated names.  It will get tripped up with two first names, but that is extremely difficult to trap for.</p>
<p>To call this function, use use the following syntax:</p>
<p>select dbo.PARSE_NAME_UDF(full_name,&#8217;F') as FirstName,  dbo.PARSE_NAME_UDF(full_name,&#8217;L') as LastName from myTable</p>
<p>&nbsp;</p>
<blockquote><p>create function [dbo].[PARSE_NAME_UDF](@NameString varchar(100), @NameFormat varchar(20))<br />
returns varchar(100) as<br />
begin</p>
<p>&#8211;PARSE_NAME_UDF decodes a NameString into its component parts and returns it in a requested format.<br />
&#8211;@NameString is the raw value to be parsed.<br />
&#8211;@NameFormat is a string that defines the output format.  Each letter in the string represents<br />
&#8211;a component of the name in the order that it is to be returned.<br />
&#8211;    [H] = Full honorific<br />
&#8211;    [h] = Abbreviated honorific<br />
&#8211;    [F] = First name<br />
&#8211;    [f] = First initial<br />
&#8211;    [M] = Middle name<br />
&#8211;    [m] = Middle initial<br />
&#8211;    [L] = Last name<br />
&#8211;    [l] = Last initial<br />
&#8211;    [S] = Full suffix<br />
&#8211;    [s] = Abbreviated suffix<br />
&#8211;    [.] = Period<br />
&#8211;    [,] = Comma<br />
&#8211;    [ ] = Space<br />
&#8211;Test variables<br />
&#8211; declare    @NameString varchar(50)<br />
&#8211; declare    @NameFormat varchar(20)<br />
&#8211; set    @NameFormat = &#8216;F M L S&#8217;<br />
&#8211; set    @NameString = &#8216;Melvin Carter, Jr&#8217;</p>
<p>Declare    @Honorific varchar(20)<br />
Declare @FirstName varchar(20)<br />
Declare @MiddleName varchar(30)<br />
Declare @LastName varchar(30)<br />
Declare @Suffix varchar(20)<br />
Declare    @TempString varchar(100)<br />
Declare    @TempString2 varchar(100)<br />
Declare    @IgnorePeriod char(1)</p>
<p>&#8211;Prepare the string</p>
<p>&#8211;Make sure each period is followed by a space character.<br />
set    @NameString = rtrim(ltrim(replace(@NameString, &#8216;.&#8217;, &#8216;. &#8216;)))</p>
<p>&#8211;Remove disallowed characters<br />
declare    @PatternString varchar(50)<br />
set    @PatternString = &#8216;%[^a-z ,-]%&#8217;<br />
while    patindex(@PatternString, @NameString) &gt; 0 set @NameString = stuff(@NameString, patindex(@PatternString, @NameString), 1, &#8216; &#8216;)</p>
<p>&#8211;Remove telephone ext<br />
set    @NameString = ltrim(rtrim(replace(&#8216; &#8216; + @NameString + &#8216; &#8216;, &#8216; EXT &#8216;, &#8216; &#8216;)))</p>
<p>&#8211;Eliminate double-spaces.<br />
while  charindex(&#8216;  &#8216;, @NameString) &gt; 0 set @NameString = replace(@NameString, &#8216;  &#8216;, &#8216; &#8216;)</p>
<p>&#8211;Eliminate periods<br />
while  charindex(&#8216;.&#8217;, @NameString) &gt; 0 set @NameString = replace(@NameString, &#8216;.&#8217;, &#8221;)</p>
<p>&#8211;Remove spaces around hyphenated names<br />
set    @NameString = replace(replace(@NameString, &#8216;- &#8216;, &#8216;-&#8217;), &#8216; -&#8217;, &#8216;-&#8217;)</p>
<p>&#8211;Remove commas before suffixes<br />
set    @NameString = replace(@NameString, &#8216;, Jr&#8217;, &#8216; Jr&#8217;)<br />
set    @NameString = replace(@NameString, &#8216;, Sr&#8217;, &#8216; Sr&#8217;)<br />
set    @NameString = replace(@NameString, &#8216;, II&#8217;, &#8216; II&#8217;)<br />
set    @NameString = replace(@NameString, &#8216;, III&#8217;, &#8216; III&#8217;)</p>
<p>&#8211;Temporarily join multi-word surnames<br />
set    @NameString = ltrim(replace(&#8216; &#8216; + @NameString, &#8216; Del &#8216;, &#8216; Del~&#8217;))<br />
set    @NameString = ltrim(replace(&#8216; &#8216; + @NameString, &#8216; Van &#8216;, &#8216; Van~&#8217;))<br />
set    @NameString = ltrim(replace(&#8216; &#8216; + @NameString, &#8216; Von &#8216;, &#8216; Von~&#8217;))<br />
set    @NameString = ltrim(replace(&#8216; &#8216; + @NameString, &#8216; Mc &#8216;, &#8216; Mc~&#8217;))<br />
set    @NameString = ltrim(replace(&#8216; &#8216; + @NameString, &#8216; Mac &#8216;, &#8216; Mac~&#8217;))<br />
set    @NameString = ltrim(replace(&#8216; &#8216; + @NameString, &#8216; La &#8216;, &#8216; La~&#8217;)) &#8211;Must be checked before &#8220;De&#8221;, to handle &#8220;De La [Surname]&#8220;s.<br />
set    @NameString = ltrim(replace(&#8216; &#8216; + @NameString, &#8216; De &#8216;, &#8216; De~&#8217;))</p>
<p>&#8211;If the lastname is listed first, strip it off.<br />
set    @TempString = rtrim(left(@NameString, charindex(&#8216; &#8216;, @NameString)))<br />
&#8211;Below logic now handled by joining multi-word surnames above.<br />
&#8211;if    @TempString in (&#8216;VAN&#8217;, &#8216;VON&#8217;, &#8216;MC&#8217;, &#8216;Mac&#8217;, &#8216;DE&#8217;) set @TempString = rtrim(left(@NameString, charindex(&#8216; &#8216;, @NameString, len(@TempString)+2)))</p>
<p>&#8211;Search for suffixes trailing the LastName<br />
set    @TempString2 = ltrim(right(@NameString, len(@NameString) &#8211; len(@TempString)))<br />
set    @TempString2 = rtrim(left(@TempString2, charindex(&#8216; &#8216;, @TempString2)))</p>
<p>if    right(@TempString2, 1) = &#8216;,&#8217;<br />
begin<br />
set @Suffix = left(@TempString2, len(@TempString2)-1)<br />
set @LastName = left(@TempString, len(@TempString))<br />
end<br />
if    right(@TempString, 1) = &#8216;,&#8217; set @LastName = left(@TempString, len(@TempString)-1)<br />
if    len(@LastName) &gt; 0 set    @NameString = ltrim(right(@NameString, len(@NameString) &#8211; len(@TempString)))<br />
if    len(@Suffix) &gt; 0 set    @NameString = ltrim(right(@NameString, len(@NameString) &#8211; len(@TempString2)))</p>
<p>&#8211;Get rid of any remaining commas<br />
while  charindex(&#8216;,&#8217;, @NameString) &gt; 0 set @NameString = replace(@NameString, &#8216;,&#8217;, &#8221;)<br />
&#8211;Get Honorific and strip it out of the string<br />
set    @TempString = rtrim(left(@NameString, charindex(&#8216; &#8216;, @NameString + &#8216; &#8216;)))<br />
if    @TempString in (<br />
&#8216;Admiral&#8217;, &#8216;Adm&#8217;,<br />
&#8216;Captain&#8217;, &#8216;Cpt&#8217;, &#8216;Capt&#8217;,<br />
&#8216;Commander&#8217;, &#8216;Cmd&#8217;,<br />
&#8216;Corporal&#8217;, &#8216;Cpl&#8217;,<br />
&#8216;Doctor&#8217;, &#8216;Dr&#8217;,<br />
&#8216;Father&#8217;, &#8216;Fr&#8217;,<br />
&#8216;General&#8217;, &#8216;Gen&#8217;,<br />
&#8216;Governor&#8217;, &#8216;Gov&#8217;,<br />
&#8216;Honorable&#8217;, &#8216;Hon&#8217;,<br />
&#8216;Lieutenant&#8217;, &#8216;Lt&#8217;,<br />
&#8216;Madam&#8217;, &#8216;Mdm&#8217;,<br />
&#8216;Madame&#8217;, &#8216;Mme&#8217;,<br />
&#8216;Mademoiselle&#8217;, &#8216;Mlle&#8217;,<br />
&#8216;Major&#8217;, &#8216;Maj&#8217;,<br />
&#8216;Miss&#8217;, &#8216;Ms&#8217;,<br />
&#8216;Mr&#8217;,<br />
&#8216;Mrs&#8217;,<br />
&#8216;President&#8217;, &#8216;Pres&#8217;,<br />
&#8216;Private&#8217;, &#8216;Pvt&#8217;,<br />
&#8216;Professor&#8217;, &#8216;Prof&#8217;,<br />
&#8216;Rabbi&#8217;,<br />
&#8216;Reverend&#8217;, &#8216;Rev&#8217;,<br />
&#8216;Senior&#8217;, &#8216;Sr&#8217;,<br />
&#8216;Seniora&#8217;, &#8216;Sra&#8217;,<br />
&#8216;Seniorita&#8217;, &#8216;Srta&#8217;,<br />
&#8216;Sergeant&#8217;, &#8216;Sgt&#8217;,<br />
&#8216;Sir&#8217;,<br />
&#8216;Sister&#8217;) set @Honorific = @TempString<br />
if    len(@Honorific) &gt; 0 set    @NameString = ltrim(right(@NameString, len(@NameString) &#8211; len(@TempString)))<br />
&#8211;Get Suffix and strip it out of the string<br />
if @Suffix is null<br />
begin<br />
set    @TempString = ltrim(right(@NameString, charindex(&#8216; &#8216;, Reverse(@NameString) + &#8216; &#8216;)))<br />
if    @TempString in (<br />
&#8216;Attorney&#8217;, &#8216;Att&#8217;, &#8216;Atty&#8217;,<br />
&#8216;BA&#8217;,<br />
&#8216;BS&#8217;,<br />
&#8216;CPA&#8217;,<br />
&#8216;DDS&#8217;,<br />
&#8216;DVM&#8217;,<br />
&#8216;Esquire&#8217;, &#8216;Esq&#8217;,<br />
&#8216;II&#8217;,<br />
&#8216;III&#8217;,<br />
&#8216;IV&#8217;,<br />
&#8216;Junior&#8217;, &#8216;Jr&#8217;,<br />
&#8216;MBA&#8217;,<br />
&#8216;MD&#8217;,<br />
&#8216;OD&#8217;,<br />
&#8216;PHD&#8217;,<br />
&#8216;Senior&#8217;, &#8216;Sr&#8217;) set @Suffix = @TempString<br />
if    len(@Suffix) &gt; 0 set @NameString = rtrim(left(@NameString, len(@NameString) &#8211; len(@TempString)))<br />
end</p>
<p>if @LastName is null<br />
begin<br />
&#8211;Get LastName and strip it out of the string<br />
set    @LastName = ltrim(right(@NameString, charindex(&#8216; &#8216;, Reverse(@NameString) + &#8216; &#8216;)))<br />
set    @NameString = rtrim(left(@NameString, len(@NameString) &#8211; len(@LastName)))<br />
&#8211;Below logic now handled by joining multi-word surnames above.<br />
/*    &#8211;Check to see if the last name has two parts<br />
set    @TempString = ltrim(right(@NameString, charindex(&#8216; &#8216;, Reverse(@NameString) + &#8216; &#8216;)))<br />
if    @TempString in (&#8216;VAN&#8217;, &#8216;VON&#8217;, &#8216;MC&#8217;, &#8216;Mac&#8217;, &#8216;DE&#8217;)<br />
begin<br />
set @LastName = @TempString + &#8216; &#8216; + @LastName<br />
set @NameString = rtrim(left(@NameString, len(@NameString) &#8211; len(@TempString)))<br />
end<br />
*/<br />
end<br />
&#8211;Get FirstName and strip it out of the string<br />
set    @FirstName = rtrim(left(@NameString, charindex(&#8216; &#8216;, @NameString + &#8216; &#8216;)))<br />
set    @NameString = ltrim(right(@NameString, len(@NameString) &#8211; len(@FirstName)))<br />
&#8211;Anything remaining is MiddleName<br />
set    @MiddleName = @NameString<br />
&#8211;Create the output string<br />
set    @TempString = &#8221;<br />
while len(@NameFormat) &gt; 0<br />
begin<br />
if @IgnorePeriod = &#8216;F&#8217; or left(@NameFormat, 1) &lt;&gt; &#8216;.&#8217;<br />
begin<br />
set @IgnorePeriod = &#8216;F&#8217;<br />
set @TempString = @TempString +<br />
case ascii(left(@NameFormat, 1))<br />
when &#8217;32&#8242; then case right(@TempString, 1)<br />
when &#8216; &#8216; then &#8221;<br />
else &#8216; &#8216;<br />
end<br />
when &#8217;44&#8242; then case right(@TempString, 1)<br />
when &#8216; &#8216; then &#8221;<br />
else &#8216;,&#8217;<br />
end<br />
when &#8217;46&#8242; then case right(@TempString, 1)<br />
when &#8216; &#8216; then &#8221;<br />
else &#8216;.&#8217;<br />
end<br />
when &#8217;70&#8242; then isnull(@FirstName, &#8221;)<br />
when &#8217;72&#8242; then case @Honorific<br />
when &#8216;Adm&#8217; then &#8216;Admiral&#8217;<br />
when &#8216;Capt&#8217; then &#8216;Captain&#8217;<br />
when &#8216;Cmd&#8217; then &#8216;Commander&#8217;<br />
when &#8216;Cpl&#8217; then &#8216;Corporal&#8217;<br />
when &#8216;Cpt&#8217; then &#8216;Captain&#8217;<br />
when &#8216;Dr&#8217; then &#8216;Doctor&#8217;<br />
when &#8216;Fr&#8217; then &#8216;Father&#8217;<br />
when &#8216;Gen&#8217; then &#8216;General&#8217;<br />
when &#8216;Gov&#8217; then &#8216;Governor&#8217;<br />
when &#8216;Hon&#8217; then &#8216;Honorable&#8217;<br />
when &#8216;Lt&#8217; then &#8216;Lieutenant&#8217;<br />
when &#8216;Maj&#8217; then &#8216;Major&#8217;<br />
when &#8216;Mdm&#8217; then &#8216;Madam&#8217;<br />
when &#8216;Mlle&#8217; then &#8216;Mademoiselle&#8217;<br />
when &#8216;Mme&#8217; then &#8216;Madame&#8217;<br />
when &#8216;Ms&#8217; then &#8216;Miss&#8217;<br />
when &#8216;Pres&#8217; then &#8216;President&#8217;<br />
when &#8216;Prof&#8217; then &#8216;Professor&#8217;<br />
when &#8216;Pvt&#8217; then &#8216;Private&#8217;<br />
when &#8216;Sr&#8217; then &#8216;Senior&#8217;<br />
when &#8216;Sra&#8217; then &#8216;Seniora&#8217;<br />
when &#8216;Srta&#8217; then &#8216;Seniorita&#8217;<br />
when &#8216;Rev&#8217; then &#8216;Reverend&#8217;<br />
when &#8216;Sgt&#8217; then &#8216;Sergeant&#8217;<br />
else isnull(@Honorific, &#8221;)<br />
end<br />
when &#8217;76&#8242; then isnull(@LastName, &#8221;)<br />
when &#8217;77&#8242; then isnull(@MiddleName, &#8221;)<br />
when &#8217;83&#8242; then case @Suffix<br />
when &#8216;Att&#8217; then &#8216;Attorney&#8217;<br />
when &#8216;Atty&#8217; then &#8216;Attorney&#8217;<br />
when &#8216;Esq&#8217; then &#8216;Esquire&#8217;<br />
when &#8216;Jr&#8217; then &#8216;Junior&#8217;<br />
when &#8216;Sr&#8217; then &#8216;Senior&#8217;<br />
else isnull(@Suffix, &#8221;)<br />
end<br />
when &#8217;102&#8242; then isnull(left(@FirstName, 1), &#8221;)<br />
when &#8217;104&#8242; then case @Honorific<br />
when &#8216;Admiral&#8217; then &#8216;Adm&#8217;<br />
when &#8216;Captain&#8217; then &#8216;Capt&#8217;<br />
when &#8216;Commander&#8217; then &#8216;Cmd&#8217;<br />
when &#8216;Corporal&#8217; then &#8216;Cpl&#8217;<br />
when &#8216;Doctor&#8217; then &#8216;Dr&#8217;<br />
when &#8216;Father&#8217; then &#8216;Fr&#8217;<br />
when &#8216;General&#8217; then &#8216;Gen&#8217;<br />
when &#8216;Governor&#8217; then &#8216;Gov&#8217;<br />
when &#8216;Honorable&#8217; then &#8216;Hon&#8217;<br />
when &#8216;Lieutenant&#8217; then &#8216;Lt&#8217;<br />
when &#8216;Madam&#8217; then &#8216;Mdm&#8217;<br />
when &#8216;Madame&#8217; then &#8216;Mme&#8217;<br />
when &#8216;Mademoiselle&#8217; then &#8216;Mlle&#8217;<br />
when &#8216;Major&#8217; then &#8216;Maj&#8217;<br />
when &#8216;Miss&#8217; then &#8216;Ms&#8217;<br />
when &#8216;President&#8217; then &#8216;Pres&#8217;<br />
when &#8216;Private&#8217; then &#8216;Pvt&#8217;<br />
when &#8216;Professor&#8217; then &#8216;Prof&#8217;<br />
when &#8216;Reverend&#8217; then &#8216;Rev&#8217;<br />
when &#8216;Senior&#8217; then &#8216;Sr&#8217;<br />
when &#8216;Seniora&#8217; then &#8216;Sra&#8217;<br />
when &#8216;Seniorita&#8217; then &#8216;Srta&#8217;<br />
when &#8216;Sergeant&#8217; then &#8216;Sgt&#8217;<br />
else isnull(@Honorific, &#8221;)<br />
end<br />
when &#8217;108&#8242; then isnull(left(@LastName, 1), &#8221;)<br />
when &#8217;109&#8242; then isnull(left(@MiddleName, 1), &#8221;)<br />
when &#8217;115&#8242; then case @Suffix<br />
when &#8216;Attorney&#8217; then &#8216;Atty&#8217;<br />
when &#8216;Esquire&#8217; then &#8216;Esq&#8217;<br />
when &#8216;Junior&#8217; then &#8216;Jr&#8217;<br />
when &#8216;Senior&#8217; then &#8216;Sr&#8217;<br />
else isnull(@Suffix, &#8221;)<br />
end<br />
else &#8221;<br />
end<br />
&#8211;The following honorifics and suffixes have no further abbreviations, and so should not be followed by a period:<br />
if ((ascii(left(@NameFormat, 1)) = 72 and @Honorific in (&#8216;Rabbi&#8217;, &#8216;Sister&#8217;))<br />
or (ascii(left(@NameFormat, 1)) = 115 and @Suffix in (&#8216;BA&#8217;, &#8216;BS&#8217;, &#8216;DDS&#8217;, &#8216;DVM&#8217;, &#8216;II&#8217;, &#8216;III&#8217;, &#8216;IV&#8217;, &#8216;V&#8217;, &#8216;MBA&#8217;, &#8216;MD&#8217;, &#8216;PHD&#8217;)))<br />
set @IgnorePeriod = &#8216;T&#8217;<br />
end<br />
set @NameFormat = right(@NameFormat, len(@NameFormat) &#8211; 1)<br />
end<br />
&#8211;select    replace(@TempString, &#8216;~&#8217;, &#8216; &#8216;)<br />
Return replace(@TempString, &#8216;~&#8217;, &#8216; &#8216;)<br />
end</p></blockquote>
<p>&nbsp;</p>
<div class='wpfblike' ><fb:like href='http://www.fostersolutions.com/2011/08/parsing-names-sql-server/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div>]]></content:encoded>
			<wfw:commentRss>http://www.fostersolutions.com/2011/08/parsing-names-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

