|
Posted by Tracy McKibben on 08/16/06 12:59
dba_222@yahoo.com wrote:
> Thanks for looking and responding.
> Ok, This is part of what I wrote (as I posted).
> I ran it in Query Analyser.
>
> The symptom, as I mentioned, was not an error.
> It was an infinite loop. (Has no one copied, and
> pasted it???)
>
> While @@fetch_status = 0
>
> Print @customerid
>
> Fetch all_cust
> Into @customerid,
> @Companyname,
> @ContactName
>
> End /* while */
>
> The idea being, that the while is supposed to start at While,
> and finish at End. Exactly what I found online.
>
> Are you saying that a while loop can only handle one statement??
>
> If not, what is the syntax to get it to execute all the code between
> the While, and the End??? Do we give it a Begin???
>
> These are some of the strange things I've found with Sql Server.
> No semicolons to indicate the end of statement.
> And no Begin or End to indicate the start and end of a block.
> Much more difficult to read, and to write. In Oracle, you MUST
> have an END LOOP statement, and semicolons.
> You must also start and end the procedure with BEGIN and END.
> Otherwise it won't even compile.
Did you come here seeking help, or just to bash SQL Server? None of
what you just rambled is true.
If you're TRULY interested in learning the T-SQL dialect, I suggest you
pick up a copy of "SQL In A Nutshell", it is an excellent resource for
comparing, side-by-side, the various platform differences for a given
SQL command.
--
Tracy McKibben
MCDBA
http://www.realsqlguy.com
[Back to original message]
|