0

I have in my function this TVP parameter:

@SiteTypeId [dbo].[intArray]

How can I check if this parameter is empty?

1
  • Perhaps you can try using NullIf function? Commented Oct 29, 2016 at 20:50

1 Answer 1

1

How can I check if this parameter is empty? Here considering empty as zero records in table since it is a table valued parameter

You can check it using IF NOT EXISTS

IF NOT EXISTS (Select 1 from @SiteTypeId)
Begin
--statements
End
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.