Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Stored Procedure Parameters - Setting a default value

$
0
0

Using SQL 2005, 2008, 2012

This should be easy, but think that I am making it hard. Below is the stored procedure that I want to call. If I want to pass a 'N' to @SearchDBsFlag how can I retain the default values for @DBName and @PreviewTextSize? I do not want to explicitly pass the NULL, 100. I want it to pick up the default values that are defined in the stored procedure.

Create Procedure [dbo].[ifs_util_Find] 
	  @SearchText varchar(8000)
	, @DBName sysname = Null
	, @PreviewTextSize int = 100
	, @SearchDBsFlag char(1) = 'Y'
	, @SearchJobsFlag char(1) = 'Y'
	, @SearchSSISFlag char(1) = 'Y'


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>