﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Cloud Computing / SQL Azure - Development  / Foiled By SQL Azure Again / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Mon, 20 May 2013 22:10:25 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Foiled By SQL Azure Again</title><link>http://www.sqlservercentral.com/Forums/Topic1051921-2571-1.aspx</link><description>I'd recommend a tally table. Keep the computations to a minimum as this will result in more compute cycles which will impact on the cost of the instance over time.</description><pubDate>Mon, 23 Apr 2012 02:26:26 GMT</pubDate><dc:creator>Robin Sasson</dc:creator></item><item><title>RE: Foiled By SQL Azure Again</title><link>http://www.sqlservercentral.com/Forums/Topic1051921-2571-1.aspx</link><description>I guess a permanent tally makes the most sense. The cte tally table is nice for my situation, but I'll probably need it again before long. Thanks!</description><pubDate>Sat, 22 Jan 2011 16:53:07 GMT</pubDate><dc:creator>BSavoie</dc:creator></item><item><title>RE: Foiled By SQL Azure Again</title><link>http://www.sqlservercentral.com/Forums/Topic1051921-2571-1.aspx</link><description>Here is another way to create your tally table:[code] --==== cteTally   With e1 (n)     As ( --=== Create Ten 1's        Select 1 Union All Select 1 Union All        Select 1 Union All Select 1 Union All        Select 1 Union All Select 1 Union All        Select 1 Union All Select 1 Union All        Select 1 Union All Select 1)      , e2 (n) As (Select 1 From e1 a, e1 b)      , e3 (n) As (Select 1 From e2 a, e2 b)      , cteTally(n) As (Select row_number() over(Order By (Select n)) From e3) Select *   From cteTally;[/code]</description><pubDate>Sat, 22 Jan 2011 10:27:18 GMT</pubDate><dc:creator>Jeffrey Williams 3188</dc:creator></item><item><title>RE: Foiled By SQL Azure Again</title><link>http://www.sqlservercentral.com/Forums/Topic1051921-2571-1.aspx</link><description>some methods are discussed here [url]http://www.projectdmx.com/tsql/tblnumbers.aspx[/url]</description><pubDate>Sat, 22 Jan 2011 09:57:01 GMT</pubDate><dc:creator>Dave Ballantyne</dc:creator></item><item><title>RE: Foiled By SQL Azure Again</title><link>http://www.sqlservercentral.com/Forums/Topic1051921-2571-1.aspx</link><description>i haven't tried Azure yet, but why can't you create a permanent Tally table and use that?</description><pubDate>Sat, 22 Jan 2011 09:03:58 GMT</pubDate><dc:creator>Lowell</dc:creator></item><item><title>RE: Foiled By SQL Azure Again</title><link>http://www.sqlservercentral.com/Forums/Topic1051921-2571-1.aspx</link><description>Here's my obvious, brute force answer. Sure seems slow though[code="sql"]DECLARE @Tally TABLE ( Number int)DECLARE @ThisNum intSET @ThisNum = 0WHILE @ThisNum &amp;lt; 10000 BEGIN	INSERT INTO @Tally(Number) VALUES(@ThisNum)	SET @ThisNum = @ThisNum + 1END[/code]</description><pubDate>Fri, 21 Jan 2011 23:54:44 GMT</pubDate><dc:creator>BSavoie</dc:creator></item><item><title>Foiled By SQL Azure Again</title><link>http://www.sqlservercentral.com/Forums/Topic1051921-2571-1.aspx</link><description>Anybody know of a good alternative for a "tally table" on SQL Azure? Like most things useful, this is not supported on SQL Azure:[code="sql"]SELECT Number N FROM master..spt_values WHERE TYPE='P'[/code]</description><pubDate>Fri, 21 Jan 2011 23:46:39 GMT</pubDate><dc:creator>BSavoie</dc:creator></item></channel></rss>