﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 7,2000 / T-SQL  / Arrays / 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 02:53:02 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Arrays</title><link>http://www.sqlservercentral.com/Forums/Topic551277-8-1.aspx</link><description>Thanks Jeff !</description><pubDate>Mon, 18 Aug 2008 07:03:52 GMT</pubDate><dc:creator>karthik M</dc:creator></item><item><title>RE: Arrays</title><link>http://www.sqlservercentral.com/Forums/Topic551277-8-1.aspx</link><description>You can get by without creating the extra temp table...[code] SELECT d.Name,t.N*10 AS DeciCount   FROM (SELECT Name,COUNT(*) AS TheCount           FROM #Name          GROUP BY Name) d  INNER JOIN dbo.Tally t     ON t.N &amp;lt;= d.TheCount[/code]GoFigureFW... if you don't know what a Tally table is, please see the following link...[url]http://www.sqlservercentral.com/articles/TSQL/62867/[/url]</description><pubDate>Sun, 17 Aug 2008 18:53:36 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Arrays</title><link>http://www.sqlservercentral.com/Forums/Topic551277-8-1.aspx</link><description>Hey,Try this code.Create table #name(Name varchar(5),Value int null)goinsert into #name (Name)select 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'ABC'union allselect 'XYZ'union allselect 'XYZ'union allselect 'XYZ'union allselect 'XYZ'union allselect 'MNO'union allselect 'PQR'union allselect 'PQR'goselect Name,count(Name) as Cntinto #Cntfrom #namegroup by NameSelect Name,N*10from #Cnt,Tallywhere N &amp;lt;= Cnt</description><pubDate>Wed, 13 Aug 2008 03:21:56 GMT</pubDate><dc:creator>karthik M</dc:creator></item><item><title>Arrays</title><link>http://www.sqlservercentral.com/Forums/Topic551277-8-1.aspx</link><description>I am kinda new to querying.Scenario:I have two columns. (Item-Column1) and (Position-Column2).The Item column has many different duplicate records.  I am trying to insert value in multiples of 10, in the Position column as it searches for each duplicate record (in column1).I remember doing this in college, but I need a little reminder...  Thanks for any help!Example is below.Example:~~~~~~~~~~Current: Column1          Column2--------          --------ABC                  {null}ABC                  {null}XYZ                  {null}ABC                  {null}XYZ                  {null}XYZ                  {null}ABC                  {null}HIJ                   {null}ABC                  {null}==================================After:Column1          Column2--------          --------ABC                  10ABC                  20ABC                  30ABC                  40ABC                  50XYZ                  10XYZ                  20XYZ                  30HIJ                   10</description><pubDate>Tue, 12 Aug 2008 11:49:31 GMT</pubDate><dc:creator>gofigurefw</dc:creator></item></channel></rss>