🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.databases.ms-sqlserver
Article #101

SQL statement help

#101
From: YA
Date: Tue, 29 May 2001 08:01
11 lines
1315 bytes
I have a table on SQL Server 2000 with 1 field: Number.
The data is like 1,2,3,6,7,10,11.
I would like to write a SQL statement that will create a RecordSet with 2
fields: Start, Size.
Start: 1 , Size :3
Start: 6 , Size :2
Start: 10 , Size :2
As you can see from the example I need to join all the consecutive numbers
and how many numbers joined.
Thanks
ya94@hotmail.com
Technical Details
Message-ID: <3b13499d@news.bezeqint.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!skynet.be!newsfeed.online.be!ams.uu.net!news.bezeqint.net!pt8-238.nas.bezeqint.net

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 104de1,97746d322c30c3cd,start
X-Google-Attributes: gid104de1,public
X-Google-Thread: ff490,97746d322c30c3cd,start
X-Google-Attributes: gidff490,public
X-Google-ArrivalTime: 2001-05-29 00:02:35 PST
From: "YA" <ya94@hotmail.com>
Newsgroups: comp.databases.ms-sqlserver,cz.comp.microsoft.sql
Subject: SQL statement help
Date: Tue, 29 May 2001 10:01:49 +0200
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
NNTP-Posting-Host: pt8-238.nas.bezeqint.net
Message-ID: <3b13499d@news.bezeqint.net>
X-Trace: 29 May 2001 10:02:53 +0200, pt8-238.nas.bezeqint.net
Organization: Bezeq International Ltd.
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!skynet.be!newsfeed.online.be!ams.uu.net!news.bezeqint.net!pt8-238.nas.bezeqint.net