Pass Table as a Parameter to Sql Procedure.
Pass Table as a Parameter to Sql Procedure. In this article I am Using 3 tier architecture for passing Table as parameter from 1 layer to other ,and finally to Stored procedure. Step 1 : Create Database : (A) Table for data insertion. CREATE TABLE [dbo] . [SETTINGS] ( [Id] [int] IDENTITY ( 1 , 1 ) NOT NULL, [BusinessId] [int] NULL, [Year] [int] NULL, [Month] [int] NULL, [BudgetAmt] [decimal] ( 6 , 2 ) NULL, [FiscalForm] [datetime] NULL, [FiscalTo] [datetime] NULL, [AustFinYear] [bit] NULL, ) ( B) User defined table type which will be used as a table valued parameter in the stored procedure. CREATE TYPE dbo . SETTINGS_type AS TABLE ( BusinessId int , Year in...