<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Solution &#8211; 2 T-SQL Puzzles &#8211; Display Star and Shortest Code to Display 1</title>
	<atom:link href="http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 17 May 2013 15:26:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Kamal Yare</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-365213</link>
		<dc:creator><![CDATA[Kamal Yare]]></dc:creator>
		<pubDate>Sat, 27 Oct 2012 05:13:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-365213</guid>
		<description><![CDATA[SELECT COUNT(getdate())]]></description>
		<content:encoded><![CDATA[<p>SELECT COUNT(getdate())</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iamAkashSingh</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-363463</link>
		<dc:creator><![CDATA[iamAkashSingh]]></dc:creator>
		<pubDate>Tue, 23 Oct 2012 20:45:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-363463</guid>
		<description><![CDATA[Not the shortest one but i guess unique one :-)
SELECT CONVERT (bit, &#039;true&#039;)]]></description>
		<content:encoded><![CDATA[<p>Not the shortest one but i guess unique one :-)<br />
SELECT CONVERT (bit, &#8216;true&#8217;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iamAkashSingh</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-363462</link>
		<dc:creator><![CDATA[iamAkashSingh]]></dc:creator>
		<pubDate>Tue, 23 Oct 2012 20:44:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-363462</guid>
		<description><![CDATA[Something unique but not not shortest one..
SELECT CONVERT (bit, &#039;true&#039;)]]></description>
		<content:encoded><![CDATA[<p>Something unique but not not shortest one..<br />
SELECT CONVERT (bit, &#8216;true&#8217;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQLAuthority News &#8211; Amazon Gift Card Raffle for Beta Tester Feedback for NuoDB &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-358577</link>
		<dc:creator><![CDATA[SQLAuthority News &#8211; Amazon Gift Card Raffle for Beta Tester Feedback for NuoDB &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Thu, 11 Oct 2012 01:31:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-358577</guid>
		<description><![CDATA[[...] the winner of their last contest was Jaime Martínez [...]]]></description>
		<content:encoded><![CDATA[<p>[...] the winner of their last contest was Jaime Martínez [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sql</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-357956</link>
		<dc:creator><![CDATA[sql]]></dc:creator>
		<pubDate>Tue, 09 Oct 2012 15:51:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-357956</guid>
		<description><![CDATA[hi, when the results will be announced.. ?]]></description>
		<content:encoded><![CDATA[<p>hi, when the results will be announced.. ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-355567</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Wed, 03 Oct 2012 16:46:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-355567</guid>
		<description><![CDATA[SELECT COUNT(*) has 6+8=14 chars
SELECT EXP($) has 6+6=12 chars

The contest was of shortest code. Just like EXP, COUNT is also built in function and like $, * is also symbol.  I think looking at this SELECT COUNT(*) is not a right answer but SELECT EXP($) is. 

Again remember the contest was to write shortest code to display 1.]]></description>
		<content:encoded><![CDATA[<p>SELECT COUNT(*) has 6+8=14 chars<br />
SELECT EXP($) has 6+6=12 chars</p>
<p>The contest was of shortest code. Just like EXP, COUNT is also built in function and like $, * is also symbol.  I think looking at this SELECT COUNT(*) is not a right answer but SELECT EXP($) is. </p>
<p>Again remember the contest was to write shortest code to display 1.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Girijesh Pandey</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-355531</link>
		<dc:creator><![CDATA[Girijesh Pandey]]></dc:creator>
		<pubDate>Wed, 03 Oct 2012 15:00:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-355531</guid>
		<description><![CDATA[Hi Pinal, 

Agreed with your response, what Satya has just asked.
How about it if i have used below code to get 1.

Mine Code:-
SELECT COUNT(*)

I think, this is another shortest way to get 1, as in your code you have used built in function EXP with SELECT Statement for a special symbol Dollar ($).

Your code:-
SELECT EXP($)

Just correct me if i am wrong, would be more than happy to listen you.

Regards,
Girijesh]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal, </p>
<p>Agreed with your response, what Satya has just asked.<br />
How about it if i have used below code to get 1.</p>
<p>Mine Code:-<br />
SELECT COUNT(*)</p>
<p>I think, this is another shortest way to get 1, as in your code you have used built in function EXP with SELECT Statement for a special symbol Dollar ($).</p>
<p>Your code:-<br />
SELECT EXP($)</p>
<p>Just correct me if i am wrong, would be more than happy to listen you.</p>
<p>Regards,<br />
Girijesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-355412</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Wed, 03 Oct 2012 09:32:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-355412</guid>
		<description><![CDATA[Satya,

SELECT LEN(&#039;a&#039;) and many other are for sure returning result but they are not shortest code when compared to SELECT EXP($). There are two extra characters in SELECT LEN(&#039;a&#039;). 

The answer should shortest length.]]></description>
		<content:encoded><![CDATA[<p>Satya,</p>
<p>SELECT LEN(&#8216;a&#8217;) and many other are for sure returning result but they are not shortest code when compared to SELECT EXP($). There are two extra characters in SELECT LEN(&#8216;a&#8217;). </p>
<p>The answer should shortest length.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satya Krishna</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-355409</link>
		<dc:creator><![CDATA[Satya Krishna]]></dc:creator>
		<pubDate>Wed, 03 Oct 2012 09:27:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-355409</guid>
		<description><![CDATA[HI Pinal ,
 Why not SELECT Len(&#039;a&#039;) ? I hope this also can be right answer. If not pls explain me]]></description>
		<content:encoded><![CDATA[<p>HI Pinal ,<br />
 Why not SELECT Len(&#8216;a&#8217;) ? I hope this also can be right answer. If not pls explain me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deanvr</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-355253</link>
		<dc:creator><![CDATA[deanvr]]></dc:creator>
		<pubDate>Tue, 02 Oct 2012 22:02:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-355253</guid>
		<description><![CDATA[nice question though even if I do get some stick for my answer, I was also thinking of the print statement... Im up for anything that makes sql fun!]]></description>
		<content:encoded><![CDATA[<p>nice question though even if I do get some stick for my answer, I was also thinking of the print statement&#8230; Im up for anything that makes sql fun!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deanvr</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-355251</link>
		<dc:creator><![CDATA[deanvr]]></dc:creator>
		<pubDate>Tue, 02 Oct 2012 22:00:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-355251</guid>
		<description><![CDATA[SELECT ’1′

the reason for using ’1′ (and I got some slack for using ’1′) is because technically ’1′ is NOT a number it is a char! so select ’1′ does reproduce the requested output, and if you where using ado to set to int sql server likes to do something called implicit casting.]]></description>
		<content:encoded><![CDATA[<p>SELECT ’1′</p>
<p>the reason for using ’1′ (and I got some slack for using ’1′) is because technically ’1′ is NOT a number it is a char! so select ’1′ does reproduce the requested output, and if you where using ado to set to int sql server likes to do something called implicit casting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-355107</link>
		<dc:creator><![CDATA[Frank]]></dc:creator>
		<pubDate>Tue, 02 Oct 2012 09:01:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-355107</guid>
		<description><![CDATA[So, what&#039;s that $ thingie? Does sql server have access to my bank account, or how does it know that it&#039;s zero?
Seriously, is that some kind of built-in variable or something?]]></description>
		<content:encoded><![CDATA[<p>So, what&#8217;s that $ thingie? Does sql server have access to my bank account, or how does it know that it&#8217;s zero?<br />
Seriously, is that some kind of built-in variable or something?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-355051</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Tue, 02 Oct 2012 03:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-355051</guid>
		<description><![CDATA[Great Point. I have added the same in explanation.]]></description>
		<content:encoded><![CDATA[<p>Great Point. I have added the same in explanation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-355050</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Tue, 02 Oct 2012 03:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-355050</guid>
		<description><![CDATA[The conditions were - not to use any digit so 1 will not be considered - even SELECT 1 will not be considered.
Additionally, what is the fun if answer was just to display 1 using PRINT and SELECT. The trick was to display 1 without using 1.]]></description>
		<content:encoded><![CDATA[<p>The conditions were &#8211; not to use any digit so 1 will not be considered &#8211; even SELECT 1 will not be considered.<br />
Additionally, what is the fun if answer was just to display 1 using PRINT and SELECT. The trick was to display 1 without using 1.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Priya</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-355040</link>
		<dc:creator><![CDATA[Priya]]></dc:creator>
		<pubDate>Tue, 02 Oct 2012 02:33:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-355040</guid>
		<description><![CDATA[Hi Pinal,

Is print 1 not considered?]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>Is print 1 not considered?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Garrett</title>
		<link>http://blog.sqlauthority.com/2012/10/02/sql-server-solution-2-t-sql-puzzles-display-star-and-shortest-code-to-display-1/#comment-355036</link>
		<dc:creator><![CDATA[Garrett]]></dc:creator>
		<pubDate>Tue, 02 Oct 2012 02:18:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20976#comment-355036</guid>
		<description><![CDATA[Though EXP and COS return the desired result, I think SELECT DAY($) is &#039;more correct&#039; because that result returns an integer rather than a float.]]></description>
		<content:encoded><![CDATA[<p>Though EXP and COS return the desired result, I think SELECT DAY($) is &#8216;more correct&#8217; because that result returns an integer rather than a float.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
