Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #917

Re: Break Up Large Table Query Into Results of N Rows

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Break Up Large Table Query Into Results of N Rows
Date Tue, 31 Jan 2012 23:03:05 +0100
Organization Erland Sommarskog
Lines 37
Message-ID <Xns9FEBEA7DF4E19Yazorman@127.0.0.1> (permalink)
References <eb6a2653-8609-495a-b05f-16a104b22f05@y10g2000vbn.googlegroups.com> <5609f740-b8b5-4876-8a4a-5633aa91a3a8@eb6g2000vbb.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
Injection-Info mx04.eternal-september.org; posting-host="nBFDv6s1VJQDuF1w6hpX2A"; logging-data="22209"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19r0tevu3rnDXUyLFCas6+q"
User-Agent Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32)
Cancel-Lock sha1:LRiyUzTz/S2VVIY636qs9Yr7iKw=
Xref x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:917

Show key headers only | View raw


pbd22 (dushkin@gmail.com) writes:
> On Jan 31, 9:57 am, pbd22 <dush...@gmail.com> wrote:
>> I am working in SQL Server 2005 and want to break up a table of 1M
>> rows into distinct results of 80,0000.
>>
>> I feel like this is basically
>>
>> use [database]
>>
>> select * from [table]
>> where email_address like '%gmail.com'
>> group by ????
>>
>> I am messing up with the group by (if this is the right way to go).
>> How do achieve this?
>>
> 
> Anybody? To people use this group any more?

I am here! However, I only look in here about once a day. The traffic
does not really warrant anymore. If you want speedy answers to your
questioms, this is a busy place:
http://social.msdn.microsoft.com/Forums/en-US/transactsql/threads
Although, a bit too many people answers questions that goes outside
what they really know.

Anyway, your problem is a little vague. What is the purpose with
this division? And must the batches be exactly 80000 rows in size
or can the number vary?

-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Break Up Large Table Query Into Results of N Rows pbd22 <dushkin@gmail.com> - 2012-01-31 06:57 -0800
  Re: Break Up Large Table Query Into Results of N Rows pbd22 <dushkin@gmail.com> - 2012-01-31 12:50 -0800
    Re: Break Up Large Table Query Into Results of N Rows "Bob Barrows" <reb01501@NOyahooSPAM.com> - 2012-01-31 16:49 -0500
    Re: Break Up Large Table Query Into Results of N Rows Erland Sommarskog <esquel@sommarskog.se> - 2012-01-31 23:03 +0100
      Re: Break Up Large Table Query Into Results of N Rows pbd22 <dushkin@gmail.com> - 2012-02-01 07:34 -0800
        Re: Break Up Large Table Query Into Results of N Rows "Bob Barrows" <reb01501@NOyahooSPAM.com> - 2012-02-01 15:36 -0500
        Re: Break Up Large Table Query Into Results of N Rows Erland Sommarskog <esquel@sommarskog.se> - 2012-02-01 23:54 +0100

csiph-web