Aleks
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.