Link to home
Start Free TrialLog in
Avatar of Aleks
AleksFlag for United States of America

asked on

Stored procedure - Select with parameters

I am trying to do a SP that will simply select from a table and use parameters.
This is what I have so far but the syntax seems to be wrong:

--

CREATE procedure [dbo].[Select_ActivityLog]
@Actdesc NVARCHAR (150) , @Module NVARCHAR (150)

SELECT Id ,
        Firmid ,
        Userid ,
        Actdate ,
        Actdesc ,
        Actstatus ,
        Actdetails ,
        Module ,
        Fileuserid
 FROM dbo.ActivitiesLog

 WHERE Actdesc = @Actdesc AND Module = @Module

GO

---

The ASP will pass the parameters to the SP. I am using SQL 2008 R2
ASKER CERTIFIED SOLUTION
Avatar of Steve Wales
Steve Wales
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial