SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Can't Run Procedure
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Grifter
Constraint Violating Yak Guru

263 Posts

Posted - 03/01/2013 :  10:05:40  Show Profile  Reply with Quote
trying to build up a procedure and testing it everytime I add a block of code. Currently just have a simple check of a value and that's it. So I create the procedure, execute so it is created and then rename it to 'alter procedure' so it doesn't fail trying to keep creating it, then try running it with EXEC dbo.myProc('Value')

And keep getting:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'Value'.

The value passed in is varchar(255)

I thought it was because I never had execute permissions on it but this still made no difference. tried refreshing as well.

This is strange I have granted permissions. Am I running it the correct way? I hope so as EXEC was always what I used to use on SQL Server 2008, I am now working on 2005, Progress right :)

Grifter


Edited by - Grifter on 03/01/2013 10:08:03

MIK_2008
Flowing Fount of Yak Knowledge

Pakistan
1054 Posts

Posted - 03/01/2013 :  10:36:10  Show Profile  Reply with Quote
try --> Exec dbo.MyProc 'value' --the procedure should have only one input parameter

the way you're using is for functions.

Cheers
MIK
Go to Top of Page

Grifter
Constraint Violating Yak Guru

263 Posts

Posted - 03/01/2013 :  10:46:24  Show Profile  Reply with Quote
quote:
Originally posted by MIK_2008

try --> Exec dbo.MyProc 'value' --the procedure should have only one input parameter

the way you're using is for functions.

Cheers
MIK


Great that works

Thanks
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000