I know how to check if a parameter is null but i am not sure how to check if its empty ... I have these parameters and I want to check the previous parameters are empty or null and then set them like below
ALTER PROCEDURE [dbo].[GetSummary]
@PreviousStartDate NVARCHAR(50) ,
@PreviousEndDate NVARCHAR(50) ,
@CurrentStartDate NVARCHAR(50) ,
@CurrentEndDate NVARCHAR(50)
AS
BEGIN
IF(@PreviousStartDate IS NULL OR EMPTY)
SET @PreviousStartdate = '01/01/2010' for example..
I would appreciate the help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…