PeterBaileyUk
asked on
sql server query in stored procedure
I have this query in a stored procedure:
is it possible for me to pass a parameter to it of some sort so that it could do a slightly different piece of sql.
the difference in this case would be not including the first left join?
is it possible for me to pass a parameter to it of some sort so that it could do a slightly different piece of sql.
the difference in this case would be not including the first left join?
USE [Dictionary]
GO
/****** Object: StoredProcedure [dbo].[usp_GetBulkDescStrings] Script Date: 19/08/2016 17:05:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[usp_GetBulkDescStrings]
AS
BEGIN
select strshort, StrShortTag, [dbo].[TblWords].ClientName, [dbo].TblVehCat.VehCategory
FROM [dbo].[TblWords] LEFT JOIN [TblWordTags] ON [TblWords].ClientCodeWordPosition = [TblWordTags].ClientCodeWordPosition LEFT JOIN [TblVehCat] ON [TblWords].ClientCode = [TblVehCat].ClientCode
WHERE [TblWordTags].ClientCodeWordPosition Is Not Null
group by strshort, StrShortTag, [dbo].[TblWords].ClientName, [dbo].TblVehCat.VehCategory
order by ClientName
END
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you
ASKER
ok