Apr 27, 2010 #1 jtarry IS-IT--Management Joined Mar 10, 2010 Messages 22 Location GB I have a table which contains a quantity value (say 3) table 1 Part Qty AAA 3 I want to insert into table 2 via a trigger Part Value AAA 1 AAA 2 AAA 3 thanks
I have a table which contains a quantity value (say 3) table 1 Part Qty AAA 3 I want to insert into table 2 via a trigger Part Value AAA 1 AAA 2 AAA 3 thanks
Apr 27, 2010 1 #2 PWise Programmer Joined Dec 12, 2002 Messages 2,633 Location US Create A digits table DigitID 1 2 3 4 5 ..... 1000000 Code: insert int Table2(Part,Value) Select Part,Digitid As Value From Table inner join Digits on qty <=Digitid Upvote 0 Downvote
Create A digits table DigitID 1 2 3 4 5 ..... 1000000 Code: insert int Table2(Part,Value) Select Part,Digitid As Value From Table inner join Digits on qty <=Digitid
Apr 27, 2010 #3 djj55 Programmer Joined Feb 6, 2006 Messages 1,761 Location US By the way you may want to look at INSTEAD OF triggers djj The Lord is My Shepard (Psalm 23) - I need someone to lead me! Upvote 0 Downvote
By the way you may want to look at INSTEAD OF triggers djj The Lord is My Shepard (Psalm 23) - I need someone to lead me!