Connect with Peer Bloggers

Get your Bloggers ID and network with best bloggers around the world.

11

Passing an array of objects to mssql stored procedure

Czetsuya
czetsuya's tech ― Oftentimes you need to pass an array of objects (could be ids, types, etc) in an mssql stored procedure that you either need to insert into a table or use as filter. The following codes will explain the latter:Pass an array of integers:ALTER PROCEDURE [dbo].[GetBranchReport]( @startDate DATETIME, @endDate DATETIME, @dealer INT, @branches VARCHAR(2000)) ASBEGIN DECLARE @sqlStatement NVARCHAR(4000), @paramDefinition NVARCHAR(100)SET @sqlStatement = 'SELECT b.Dealer, d.Branch, c.Qty, c.AmountFROM[...]

Voted by 1 User



What would you say?

Be the first to comment on this blog post! Sign in or Create an account.