September 22, 2012 at 6:21 am
I write bellow query For Insert Data but I want my Store Procedure take A List OF Data and insert it.how can i change That?
create procedure AtashSooziFloorInsert
@AtashSooziID int,@FloorID int
as
begin
insert AtashSooziFloor (AtashSooziID,FloorID)
values(@AtashSooziID,@FloorID)
end
September 22, 2012 at 7:21 am
To assist those who desire to assist you, could you supply a short sample of the "list of data" that you need to insert.
September 22, 2012 at 8:16 am
SELECT 'EXECUTE AtashSooziFloorInsert ' + CAST(AtashSoozId as varchar(100))+ '
CASTFloorID as varchar(100)) FROM ImportedTable
then you can execute this list of sql
or you write a cursor and then execute all sql
September 23, 2012 at 2:55 am
Sounds like a table valued parameter is your friend here.
September 27, 2012 at 11:06 pm
tnx Dave Ballantyne
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply