USE [AIADatabaseV5] GO /****** Object: StoredProcedure [dbo].[GetAccountModule] Script Date: 02/06/2018 10:49:31 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: madan.prajapati@magicsw.com -- Create date: 10/12/2010 -- Description: Fetch Module value corresponding to given account Id -- ============================================= CREATE PROCEDURE [dbo].[GetAccountModule] -- Add the parameters for the stored procedure here @LicenseId int = 0 AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Select statements for procedure here Select ModuleToLicense.Id, ResourceModule.Title,ModuleToLicense.Status from dbo.ModuleToLicense,ResourceModule WHERE ModuleToLicense.ModuleId = ResourceModule.Id AND ModuleToLicense.LicenseId = @LicenseId AND ResourceModule.Status = 1 END GO