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

How to use array list with fixed values to insert record in trigger

$
0
0

I have a list  of number 1,30,40,45,60 . These numbers are not being changed so I  don't need to keep in a table. So have to create a  after insert trigger   for 

As

Begin

@list =  1,30,40,45,60 // Array value 

for i=1 to @list.count

Insert into mappingtable(arrayvalue,itemcode) values (list[i],Inserted.Itemcode)

Next

End

Please can you help with a code 

Regards

Pol


polachan




Viewing all articles
Browse latest Browse all 12890

Trending Articles



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