I have the following:
CREATE Procedure InsertTestProc
(
@Name VARCHAR(50),
@Address VARCHAR(50) = NULL,
@City VARCHAR(50),
@State VARCHAR(15),
@Zip VARCHAR(10),
@NewKey INT OUTPUT
)
When I call it from the Query Analyzer using:
InsertTestProc 'Doe',,'Anycity','Anystate','12345'
I get an error message saying that on Line1 (I assume that means line 1 of the QA) there is an error at ','.
If I supply a value for the @Address parameter, I get an error message indicating that there should be a value for @NewKey.
I've checked Books Online, and this seems like it should work. What am I doing wrong?
CREATE Procedure InsertTestProc
(
@Name VARCHAR(50),
@Address VARCHAR(50) = NULL,
@City VARCHAR(50),
@State VARCHAR(15),
@Zip VARCHAR(10),
@NewKey INT OUTPUT
)
When I call it from the Query Analyzer using:
InsertTestProc 'Doe',,'Anycity','Anystate','12345'
I get an error message saying that on Line1 (I assume that means line 1 of the QA) there is an error at ','.
If I supply a value for the @Address parameter, I get an error message indicating that there should be a value for @NewKey.
I've checked Books Online, and this seems like it should work. What am I doing wrong?