>>Hi everybody,
>>
>>I've created a quite complex (parameter-wise) SP. I now want to be able to test it.
>>
>>In Query designer I created a long query that I can take my parametes from. But I'm not sure how can I create parameters out from this long and complex select.
>>
>>Any ideas for me how to create a test case?
>>
>>Thanks a lot in advance.
>
>Right click on SP in SSMS Object Explorer. Then select Execute. It will ask you about parameters and will create a script and will run SP with parameters you passed.
Thanks, but how can I set up parameters? I tried something like (started to type manually)
-- test
SELECT @PersonID = People.PersonID, People.CreatedOn, People.LastUpdated, People.DefaultPicture,
@Pwd =People.Pwd, @UserName = People.UserName, @SiteID =People.SiteID, @Comment =People.Comment, etc.
But I'm getting
Msg 141, Level 15, State 1, Line 81
A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.
And I don't see a direct way to jump to Help for this error message. How can I put the result of select statement to become my parameters? That's my question. I'd like to retrieve record for some specific IDs and pass them to my SP.
Thanks again.
If it's not broken, fix it until it is.
My Blog