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.
Author |
Topic |
Grifter
Constraint Violating Yak Guru
274 Posts |
Posted - 2013-03-01 : 10:05:40
|
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 1Incorrect 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 |
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2013-03-01 : 10:36:10
|
try --> Exec dbo.MyProc 'value' --the procedure should have only one input parameterthe way you're using is for functions.CheersMIK |
|
|
Grifter
Constraint Violating Yak Guru
274 Posts |
Posted - 2013-03-01 : 10:46:24
|
quote: Originally posted by MIK_2008 try --> Exec dbo.MyProc 'value' --the procedure should have only one input parameterthe way you're using is for functions.CheersMIK
Great that worksThanks |
|
|
|
|
|