<?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>D-Blog &#187; SELECT statement</title>
	<atom:link href="http://cubicthoughts.com/tag/select-statement/feed/" rel="self" type="application/rss+xml" />
	<link>http://cubicthoughts.com</link>
	<description>just about anything...</description>
	<lastBuildDate>Tue, 29 Nov 2011 23:48: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>
		<item>
		<title>Using the field name alias in SQL Where clause</title>
		<link>http://cubicthoughts.com/2009/03/17/using-the-field-name-alias-in-sql-where-clause/</link>
		<comments>http://cubicthoughts.com/2009/03/17/using-the-field-name-alias-in-sql-where-clause/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 23:39:29 +0000</pubDate>
		<dc:creator>Deepak Vasa</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Column Alias]]></category>
		<category><![CDATA[SELECT statement]]></category>
		<category><![CDATA[Sql Server 2005]]></category>
		<category><![CDATA[Sql Tricks]]></category>
		<category><![CDATA[WHERE clause]]></category>

		<guid isPermaLink="false">http://cubicthoughts.com/?p=119</guid>
		<description><![CDATA[Often I encounter SQL queries where I would love to use the alias names of my columns in the WHERE clause, today while trawling around the web I found a cool and easy way to do it. Here&#8217;s an example: WITH Customer_Info AS ( SELECT (Surname + &#8216;, &#8216; + Firstname) AS FullName, (Address_Line_1 + [...]]]></description>
			<content:encoded><![CDATA[<p>Often I encounter SQL queries where I would love to use the alias names of my columns in the WHERE clause, today while trawling around the web I found a cool and easy way to do it. Here&#8217;s an example:</p>
<p>WITH Customer_Info AS<br />
(<br />
    SELECT (Surname + &#8216;, &#8216; + Firstname) AS FullName,<br />
    (Address_Line_1 + &#8216;,&#8217; + Address_Line_2) AS Customer_Address<br />
    FROM Customers<br />
)<br />
SELECT FullName, Customer_Address<br />
FROM Customer_Info<br />
WHERE FullName LIKE &#8216;Smith%&#8217;</p>
Written by Deepak Vasa - <a href="http://www.cubicthoughts.com">Visit Website</a>]]></content:encoded>
			<wfw:commentRss>http://cubicthoughts.com/2009/03/17/using-the-field-name-alias-in-sql-where-clause/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

