Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 incorrect syntax t-sql

Author  Topic 

fbaraka
Starting Member

5 Posts

Posted - 2010-07-31 : 05:22:52
hello;
i don't know why i have message when i put the cursor on the first line my stored procedure like
incorrect syntax create procedure must be the only statemant in the batch , and there is a red underline underneath

my syntax is correct because i can execute the stored procedure
create procedure myschema.listproduct
@year int
with execute as caller
.....

thank you

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2010-07-31 : 07:08:05
Could you post the full stored procedure?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

fbaraka
Starting Member

5 Posts

Posted - 2010-07-31 : 13:22:52
my stored procedure is
CREATE PROCEDURE HRschema.listYear @year int
with execute as caller
AS
BEGIN
select yearPublished, Title, from MKschema.publisher
where yearPublished= @year
END

all the object exist and the procedure execute without errors, but i still have red underlined under CREATE PROCEDURE HRschema.listYear @year int

thank you
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2010-07-31 : 15:19:13
"all the object exist and the procedure execute without errors"

Then what is the problem?You don't have to worry about that red line.


Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless.

PBUH
Go to Top of Page

fbaraka
Starting Member

5 Posts

Posted - 2010-08-01 : 04:29:12
yes all the object exist and the procedure execute without errors. the problem is perhaps that the intellisence is not doing his job properly , why i don't know ?? an idea
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-08-01 : 06:42:55
Who knows.
Maybe it is because the procedure already exists and then a create would fail...


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2010-08-02 : 13:56:55
Are you using SQL Server Management Studio or are you using some other tool?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-08-02 : 14:27:34
quote:
Originally posted by fbaraka

my stored procedure is
CREATE PROCEDURE HRschema.listYear @year int
with execute as caller
AS
BEGIN
select yearPublished, Title, from MKschema.publisher
where yearPublished= @year
END

all the object exist and the procedure execute without errors, but i still have red underlined under CREATE PROCEDURE HRschema.listYear @year int

thank you




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -