By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,849 Members | 2,361 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,849 IT Pros & Developers. It's quick & easy.

Trying to do REALLY simple procedure and loop in SQL Server

P: n/a
Dear experts,

Again, sorry to bother you again with such a seemingly dumb question,
but I'm having some really mysterious results here.

ie.

Create procedure the_test
As
Begin

Select CustomerID
>From dbo.customers
-----------------------------*/
Server: Msg 170, Level 15, State 1, Procedure the_test, Line 8
Line 8: Incorrect syntax near 'customers'.

Just WHAT is the syntax please?????
-----------------------------------------

Then, this started as trying to write a procedure with a cursor.
Open cursor, loop, print, end loop. End of story.

This actually goes into an infinite loop!!!
Can anyone tell me what is wrong here?


Create procedure test2
As

Declare all_cust cursor for
Select customerid,
Companyname,
ContactName
>From customers

Declare
@Customerid varchar(5),
@Companyname varchar(40),
@ContactName varchar(30)

Begin

Select count(*)
>From customers

Open all_cust

Fetch all_cust
Into @customerid,
@Companyname,
@ContactName
While @@fetch_status = 0

Print @customerid
Fetch all_cust
Into @customerid,
@Companyname,
@ContactName

End /* while */
Close all_cust

Deallocate all_cust

Believe it or not, I'm just copying simple programs off the web,
including the Microsoft website, with slight modifications!!!!!!
Crazy!!!

Aug 16 '06 #1
Share this Question
Share on Google+
14 Replies


P: n/a
SELECT CustomerID
FROM dbo.Customers

You probably shouldn't be trying to use a cursor -it has really bad performance issues -amongst other things.

Perhaps if you were to provide us a bit more information (table DDL, sample data in the form or INSERT statements), and especially a clear explanation of what you hope to accomplish, someone here can help come up with a more efficient and non-cursor solution.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
<db*****@yahoo.comwrote in message news:11**********************@75g2000cwc.googlegro ups.com...
Dear experts,

Again, sorry to bother you again with such a seemingly dumb question,
but I'm having some really mysterious results here.

ie.

Create procedure the_test
As
Begin

Select CustomerID
>>From dbo.customers
-----------------------------*/
Server: Msg 170, Level 15, State 1, Procedure the_test, Line 8
Line 8: Incorrect syntax near 'customers'.

Just WHAT is the syntax please?????
Aug 16 '06 #2

P: n/a
I'm not even trying to do anything in particular yet.
I'm just trying to get the basics down in SQL Server.
The tables are from the Northwinds schema, or "database",
in Sql Server terms.

This is one of the most classic elementary programs you write.
Read the data, print it, end. The first one didn't even use a cursor,
but wouldn't even compile!

If I can't get Sql Server to do that, I have serious doubts about
using it for much of anything. I never had issues like this in
Oracle.

My example was 100% clear, and the question was, what is the
correct syntax to do the simple business?

If anyone knows, please tell us the secret.

Thanks!
Arnie Rowland wrote:
SELECT CustomerID
FROM dbo.Customers

You probably shouldn't be trying to use a cursor -it has really bad performance issues -amongst other things.

Perhaps if you were to provide us a bit more information (table DDL, sample data in the form or INSERT statements), and especially a clear explanation of what you hope to accomplish, someone here can help come up with a more efficient and non-cursor solution.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
<db*****@yahoo.comwrote in message news:11**********************@75g2000cwc.googlegro ups.com...
Dear experts,

Again, sorry to bother you again with such a seemingly dumb question,
but I'm having some really mysterious results here.

ie.

Create procedure the_test
As
Begin

Select CustomerID
>From dbo.customers
-----------------------------*/
Server: Msg 170, Level 15, State 1, Procedure the_test, Line 8
Line 8: Incorrect syntax near 'customers'.

Just WHAT is the syntax please?????
Aug 16 '06 #3

P: n/a
See inline comments. You are being sloppy, to but it bluntly.
You can't expect programs to work if you miss copying a
line, leave out begin-end pairs, or make other basic errors.

Steve Kass
Drew University

<db*****@yahoo.comwrote in message news:11**********************@75g2000cwc.googlegro ups.com...
Dear experts,

Again, sorry to bother you again with such a seemingly dumb question,
but I'm having some really mysterious results here.

ie.

Create procedure the_test
As
Begin

Select CustomerID
>>From dbo.customers

-----------------------------*/
Server: Msg 170, Level 15, State 1, Procedure the_test, Line 8
Line 8: Incorrect syntax near 'customers'.

Just WHAT is the syntax please?????

It looks to me like you are missing the keyword END.

-----------------------------------------

Then, this started as trying to write a procedure with a cursor.
Open cursor, loop, print, end loop. End of story.

This actually goes into an infinite loop!!!
Can anyone tell me what is wrong here?


Create procedure test2
As

Declare all_cust cursor for
Select customerid,
Companyname,
ContactName
>>From customers


Declare
@Customerid varchar(5),
@Companyname varchar(40),
@ContactName varchar(30)

Begin

Select count(*)
>>From customers


Open all_cust

Fetch all_cust
Into @customerid,
@Companyname,
@ContactName
While @@fetch_status = 0

Print @customerid

This is an infinite loop if anything is fetched. Printing @customerid
will not change the value of @@fetch_status, so the statement

WHILE @@fetch_status = 0
PRINT @customerid

will go forever.
>

Fetch all_cust
Into @customerid,
@Companyname,
@ContactName

End /* while */
Close all_cust

Deallocate all_cust

Believe it or not, I'm just copying simple programs off the web,
including the Microsoft website, with slight modifications!!!!!!
Crazy!!!

Aug 16 '06 #4

P: n/a
See inline comments. You are being sloppy, to but it bluntly.
You can't expect programs to work if you miss copying a
line, leave out begin-end pairs, or make other basic errors.

Steve Kass
Drew University

<db*****@yahoo.comwrote in message news:11**********************@75g2000cwc.googlegro ups.com...
Dear experts,

Again, sorry to bother you again with such a seemingly dumb question,
but I'm having some really mysterious results here.

ie.

Create procedure the_test
As
Begin

Select CustomerID
>>From dbo.customers

-----------------------------*/
Server: Msg 170, Level 15, State 1, Procedure the_test, Line 8
Line 8: Incorrect syntax near 'customers'.

Just WHAT is the syntax please?????

It looks to me like you are missing the keyword END.

-----------------------------------------

Then, this started as trying to write a procedure with a cursor.
Open cursor, loop, print, end loop. End of story.

This actually goes into an infinite loop!!!
Can anyone tell me what is wrong here?


Create procedure test2
As

Declare all_cust cursor for
Select customerid,
Companyname,
ContactName
>>From customers


Declare
@Customerid varchar(5),
@Companyname varchar(40),
@ContactName varchar(30)

Begin

Select count(*)
>>From customers


Open all_cust

Fetch all_cust
Into @customerid,
@Companyname,
@ContactName
While @@fetch_status = 0

Print @customerid

This is an infinite loop if anything is fetched. Printing @customerid
will not change the value of @@fetch_status, so the statement

WHILE @@fetch_status = 0
PRINT @customerid

will go forever.
>

Fetch all_cust
Into @customerid,
@Companyname,
@ContactName

End /* while */
Close all_cust

Deallocate all_cust

Believe it or not, I'm just copying simple programs off the web,
including the Microsoft website, with slight modifications!!!!!!
Crazy!!!


Aug 16 '06 #5

P: n/a
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.

Steve Kass wrote:
See inline comments. You are being sloppy, to but it bluntly.
You can't expect programs to work if you miss copying a
line, leave out begin-end pairs, or make other basic errors.

Steve Kass
Drew University

<db*****@yahoo.comwrote in message news:11**********************@75g2000cwc.googlegro ups.com...
Dear experts,

Again, sorry to bother you again with such a seemingly dumb question,
but I'm having some really mysterious results here.

ie.

Create procedure the_test
As
Begin

Select CustomerID
>From dbo.customers
-----------------------------*/
Server: Msg 170, Level 15, State 1, Procedure the_test, Line 8
Line 8: Incorrect syntax near 'customers'.

Just WHAT is the syntax please?????

It looks to me like you are missing the keyword END.

-----------------------------------------

Then, this started as trying to write a procedure with a cursor.
Open cursor, loop, print, end loop. End of story.

This actually goes into an infinite loop!!!
Can anyone tell me what is wrong here?


Create procedure test2
As

Declare all_cust cursor for
Select customerid,
Companyname,
ContactName
>From customers

Declare
@Customerid varchar(5),
@Companyname varchar(40),
@ContactName varchar(30)

Begin

Select count(*)
>From customers

Open all_cust

Fetch all_cust
Into @customerid,
@Companyname,
@ContactName
While @@fetch_status = 0

Print @customerid


This is an infinite loop if anything is fetched. Printing @customerid
will not change the value of @@fetch_status, so the statement

WHILE @@fetch_status = 0
PRINT @customerid

will go forever.


Fetch all_cust
Into @customerid,
@Companyname,
@ContactName

End /* while */
Close all_cust

Deallocate all_cust

Believe it or not, I'm just copying simple programs off the web,
including the Microsoft website, with slight modifications!!!!!!
Crazy!!!
Aug 16 '06 #6

P: n/a
In my many years of teaching SQL Server, I have only had to ask one person
to leave a class and not come back. He was a Oracle person that wanted to
argue every point, always telling me why Oracle was better. I didn't think
that he really wanted to learn about SQL Server.

Flow Control (WHILE, IF, ELSE) executes the next 'block' of code. A block of
code is EITHER a single complete command (even if on several lines) OR
several commands within a BEGIN...END block.

WHILE does not have a END.

Your code example has an END statement, leading me to believe that your
overlooked the BEGIN in the sample code that you are working with. As Steve
pointed out, your code is stuck in the act of endlessly printing the
@CustomerID.

Semi-Colons are optional as end of statement indicators. If you want to use
them, please do.

As indicated above, BEGIN and END statements are indicators of code block,
containing one or more command statements. BEGIN...END blocks can be nested.

I personally think that there are many, many strange and different things
about P-SQL. Some of them intuitive to use, others not quite so. I also
think the same about T-SQL. But when I need a screwdriver, I don't go around
fussing about why a hammer is better. I use the correct tool for the job,
respectful of its limitations.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
<db*****@yahoo.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
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.

Steve Kass wrote:
>See inline comments. You are being sloppy, to but it bluntly.
You can't expect programs to work if you miss copying a
line, leave out begin-end pairs, or make other basic errors.

Steve Kass
Drew University

<db*****@yahoo.comwrote in message
news:11**********************@75g2000cwc.googlegr oups.com...
Dear experts,

Again, sorry to bother you again with such a seemingly dumb question,
but I'm having some really mysterious results here.

ie.

Create procedure the_test
As
Begin

Select CustomerID
From dbo.customers

-----------------------------*/
Server: Msg 170, Level 15, State 1, Procedure the_test, Line 8
Line 8: Incorrect syntax near 'customers'.

Just WHAT is the syntax please?????


It looks to me like you are missing the keyword END.

-----------------------------------------

Then, this started as trying to write a procedure with a cursor.
Open cursor, loop, print, end loop. End of story.

This actually goes into an infinite loop!!!
Can anyone tell me what is wrong here?


Create procedure test2
As

Declare all_cust cursor for
Select customerid,
Companyname,
ContactName
From customers
Declare
@Customerid varchar(5),
@Companyname varchar(40),
@ContactName varchar(30)

Begin

Select count(*)
From customers
Open all_cust

Fetch all_cust
Into @customerid,
@Companyname,
@ContactName
While @@fetch_status = 0

Print @customerid


This is an infinite loop if anything is fetched. Printing @customerid
will not change the value of @@fetch_status, so the statement

WHILE @@fetch_status = 0
PRINT @customerid

will go forever.
>

Fetch all_cust
Into @customerid,
@Companyname,
@ContactName

End /* while */
Close all_cust

Deallocate all_cust

Believe it or not, I'm just copying simple programs off the web,
including the Microsoft website, with slight modifications!!!!!!
Crazy!!!

Aug 16 '06 #7

P: n/a
db*****@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
Aug 16 '06 #8

P: n/a
Thank you! That worked!

One of the websites I looked at was:
http://databases.about.com/od/sqlser...toredprocs.htm
But I can't find the other one with the loop. Now that I think of
it, the print statement was my addition.

Sorry if I'm rubbing anyone the wrong way. But I'm sure you tell, I
was getting really pissed off here. I've been working in tech for a
long time. I know that in the beginning, you have to get the basics
down. Syntax. Variables. Built in functions and other features.
Libraries. How to compile and link. How it's done in this language.
Etc. I've done this with Oracle, C, VB, some java and so on.

So, I do know what I am trying to do. And I do know that it is
possible. I'm going to the newsgroups as a last resort after
struggle. When this writer gets to that point, I just want the answer.

Just how do I do it please? Not an intellectual discussion.
Not questions or comments about what I'm trying to do.
Consider it a test question where only the right answer gets
you the marks.

Thanks again!
----------- This works:
Create procedure test2
As

Declare all_cust cursor for
Select customerid,
Companyname,
ContactName
>From customers

Declare
@Customerid varchar(5),
@Companyname varchar(40),
@ContactName varchar(30)

Begin

Select count(*)
>From customers

end
Open all_cust

Fetch all_cust
Into @customerid,
@Companyname,
@ContactName
While @@fetch_status = 0

Begin
Print ( @customerid )
Fetch next
>From all_cust
Into @customerid,
@Companyname,
@ContactName

End /* while */

Close all_cust

Deallocate all_cust


------------

Arnie Rowland wrote:
In my many years of teaching SQL Server, I have only had to ask one person
to leave a class and not come back. He was a Oracle person that wanted to
argue every point, always telling me why Oracle was better. I didn't think
that he really wanted to learn about SQL Server.

Flow Control (WHILE, IF, ELSE) executes the next 'block' of code. A block of
code is EITHER a single complete command (even if on several lines) OR
several commands within a BEGIN...END block.

WHILE does not have a END.

Your code example has an END statement, leading me to believe that your
overlooked the BEGIN in the sample code that you are working with. As Steve
pointed out, your code is stuck in the act of endlessly printing the
@CustomerID.

Semi-Colons are optional as end of statement indicators. If you want to use
them, please do.

As indicated above, BEGIN and END statements are indicators of code block,
containing one or more command statements. BEGIN...END blocks can be nested.

I personally think that there are many, many strange and different things
about P-SQL. Some of them intuitive to use, others not quite so. I also
think the same about T-SQL. But when I need a screwdriver, I don't go around
fussing about why a hammer is better. I use the correct tool for the job,
respectful of its limitations.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
<db*****@yahoo.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
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.


Aug 16 '06 #9

P: n/a
(db*****@yahoo.com) writes:
Sorry if I'm rubbing anyone the wrong way. But I'm sure you tell, I
was getting really pissed off here. I've been working in tech for a
long time. I know that in the beginning, you have to get the basics
down. Syntax. Variables. Built in functions and other features.
Libraries. How to compile and link. How it's done in this language.
Etc. I've done this with Oracle, C, VB, some java and so on.
If you want to learn basic, why start with cursors? Cursors are not
basics, cursors are things you use very occcasionally, the less the
better. Not that I know Oracle, but I can't imagine that this any different
in Oracle or any other DBMS.

If you want to learn basics for SQL, start with learning queries first.
Then how to create tables and indexing. Then you can look at flow-of-
control, procedures etc. Cursors you can save until you need them. And
if you learn the basics well, you may not even need them.
Just how do I do it please? Not an intellectual discussion.
Not questions or comments about what I'm trying to do.
Consider it a test question where only the right answer gets
you the marks.
I will have to confess that my interest in getting marks for newsgroups
posts is minimal.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Aug 16 '06 #10

P: n/a
db*****@yahoo.com wrote:
Thank you! That worked!

One of the websites I looked at was:
http://databases.about.com/od/sqlser...toredprocs.htm
But I can't find the other one with the loop. Now that I think of
it, the print statement was my addition.

Sorry if I'm rubbing anyone the wrong way. But I'm sure you tell, I
was getting really pissed off here. I've been working in tech for a
long time. I know that in the beginning, you have to get the basics
down. Syntax. Variables. Built in functions and other features.
Libraries. How to compile and link. How it's done in this language.
Etc. I've done this with Oracle, C, VB, some java and so on.

So, I do know what I am trying to do. And I do know that it is
possible. I'm going to the newsgroups as a last resort after
struggle. When this writer gets to that point, I just want the answer.

Just how do I do it please? Not an intellectual discussion.
Not questions or comments about what I'm trying to do.
Consider it a test question where only the right answer gets
you the marks.

Thanks again!
I don't know if you still have a question or not. Your revised code
works for me.

As regards test questions. I do sometimes ask one question about
cursors when I give interviews. But the only answer I'm really looking
for is that the interviewee rarely uses them.

Quote:
This is one of the most classic elementary programs you write.
Read the data, print it, end.
In SQL? Absolutely not! You just failed the interview I'm afraid :-)

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/m...S,SQL.90).aspx
--

Aug 16 '06 #11

P: n/a
db*****@yahoo.com wrote:
Thank you! That worked!

One of the websites I looked at was:
http://databases.about.com/od/sqlser...toredprocs.htm
But I can't find the other one with the loop. Now that I think of
it, the print statement was my addition.

Sorry if I'm rubbing anyone the wrong way. But I'm sure you tell, I
was getting really pissed off here. I've been working in tech for a
long time. I know that in the beginning, you have to get the basics
down. Syntax. Variables. Built in functions and other features.
Libraries. How to compile and link. How it's done in this language.
Etc. I've done this with Oracle, C, VB, some java and so on.

So, I do know what I am trying to do. And I do know that it is
possible. I'm going to the newsgroups as a last resort after
struggle. When this writer gets to that point, I just want the answer.

Just how do I do it please? Not an intellectual discussion.
Not questions or comments about what I'm trying to do.
Consider it a test question where only the right answer gets
you the marks.
So, what you're saying is that you already know your way is the best way
(even though you can't make it work), and aren't interested in hearing
alternatives to your approach. Not a bit arrogant, are we? I've been
writing T-SQL code for almost 10 years now, and I learn something new,
or am reminded of something I forgot, EVERY DAY from these newsgroups.
No matter how good you think you are, there's always somebody better out
there. As others have already pointed out to you, a cursor is rarely
the preferred tool to use in SQL, but you already knew that, right?
--
Tracy McKibben
MCDBA
http://www.realsqlguy.com
Aug 16 '06 #12

P: n/a

<db*****@yahoo.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
Dear experts,

Again, sorry to bother you again with such a seemingly dumb question,
but I'm having some really mysterious results here.
Do you reallyhave a in front of the FROM? get rid of it.

Aug 17 '06 #13

P: n/a
Greg D. Moore (Strider) (mo****************@greenms.com) writes:
><db*****@yahoo.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
>Dear experts,

Again, sorry to bother you again with such a seemingly dumb question,
but I'm having some really mysterious results here.

Do you reallyhave a in front of the FROM? get rid of it.
The '>' before 'From' was added by the news software. It's added to prevent
accidents in the Unix mbox format, where 'From ' first on a line indicates
the start of a new message.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Aug 17 '06 #14

P: n/a

"Erland Sommarskog" <es****@sommarskog.sewrote in message
news:Xn**********************@127.0.0.1...
Greg D. Moore (Strider) (mo****************@greenms.com) writes:
<db*****@yahoo.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
Dear experts,

Again, sorry to bother you again with such a seemingly dumb question,
but I'm having some really mysterious results here.
Do you reallyhave a in front of the FROM? get rid of it.

The '>' before 'From' was added by the news software. It's added to
prevent
accidents in the Unix mbox format, where 'From ' first on a line indicates
the start of a new message.

Ah, good point.

>

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx

Aug 22 '06 #15

This discussion thread is closed

Replies have been disabled for this discussion.