Friday, February 24, 2012

FOR loop

Why does'nt SQL Server 2000 support For loop conditional statements? I know
While and IF's are there, but what made Microsfot not include a For loop?use the while loop
"Srikant" <Srikant@.discussions.microsoft.com> wrote in message
news:A6D2ED63-2AB9-48FC-AF10-E151AC1707FB@.microsoft.com...
> Why does'nt SQL Server 2000 support For loop conditional statements? I
> know
> While and IF's are there, but what made Microsfot not include a For loop?|||Why does one language have this construct and the other language have anothe
r construct? As you can
imagine, we can't answer that question, because we haven't been present at t
he language design
meetings that Sybase and Microsoft has had over the years. They probably inc
luded WHILE first (every
product has a first release) and there haven't been enough customer demand t
o add further language
elements...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Srikant" <Srikant@.discussions.microsoft.com> wrote in message
news:A6D2ED63-2AB9-48FC-AF10-E151AC1707FB@.microsoft.com...
> Why does'nt SQL Server 2000 support For loop conditional statements? I kno
w
> While and IF's are there, but what made Microsfot not include a For loop?|||SQL server is not a programming language.
You're lucky to have While.
I don't think that I've ever used While in SQL.
CELKO would be proud.
"Srikant" <Srikant@.discussions.microsoft.com> wrote in message
news:A6D2ED63-2AB9-48FC-AF10-E151AC1707FB@.microsoft.com...
> Why does'nt SQL Server 2000 support For loop conditional statements? I
> know
> While and IF's are there, but what made Microsfot not include a For loop?|||Why do you want a FOR loop? Maybe there is a better way to do it in
TSQL. Or perhaps you are using TSQL for something it was never intended
for.
David Portas
SQL Server MVP
--|||WHILE and FOR loops are the same in languages like C:
for (int i=0; i < 5; ++i);
is identical (except for scope of "i") to:
int i = 0;
while (i < 5) i += 1;
"Srikant" wrote:

> Why does'nt SQL Server 2000 support For loop conditional statements? I kno
w
> While and IF's are there, but what made Microsfot not include a For loop?|||You can say anything to an officer as long as you precede it and end it with
'Sir'.
So you can use any garbage you want so long as you precede it with 'SELECT'.
Hmm...something about false idols?:)
"Raymond D'Anjou" <rdanjou@.savantsoftNOSPAM.net> wrote in message
news:%23jjVJnRRFHA.252@.TK2MSFTNGP12.phx.gbl...
> SQL server is not a programming language.
> You're lucky to have While.
> I don't think that I've ever used While in SQL.
> CELKO would be proud.|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uyDp5iRRFHA.3944@.TK2MSFTNGP10.phx.gbl...
..
> They probably included WHILE first (every product has a first release) and
> there haven't been enough customer demand to add further language
> elements...
Where can I find this data? :)

No comments:

Post a Comment