Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Procedure vs Scalar function

$
0
0
Hi,I have 10 procedures that use dynamic SQL and have the same where clause, they return different columns and join with different tables.I was thinking of creating a procedure to return, as output, the where clause since it's the same for all 10 (every time I have to add a new restriction I have to add the where clause to all the 10 procedures)....Is it best to use a procedure or a scalar function for the porpoise?Thanks,Pedro

Viewing all articles
Browse latest Browse all 3145

Trending Articles