Friday, April 25, 2014

SQL SERVER CHECK PARAMETER TEXT LENGTH EXAMPLE

BEGIN
DECLARE @RESULT VARCHAR(50)
DECLARE @JOB_TITLE_ID NVARCHAR(50)
SET @JOB_TITLE_ID ='';
IF(
(SELECT LEN(@JOB_TITLE_ID))>0)
SET @RESULT ='GREATER THAN ZERO'
ELSE
SET @RESULT = 'LESS OR EQUAL ZERO'
SELECT @RESULT;
END

No comments:

Post a Comment