Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 26, 2012 02:28 AM by Dan Bracuk
Feb 26, 2012 02:05 AM|LINK
I have a set of 100 races. Different races are sanctioned by different bodies. So I have a event_sanction table that holds the eventid and the sanctionerid. One sanctioner is good for all 100 races. Is there a way to mass insert that sanctioner? INSERT
INTO event_sanction (eventid, sanctionid) VALUES ((ALL EVENT ID's) , 1)?
Feb 26, 2012 02:26 AM|LINK
INSERT INTO event_sanction (eventid, sanctionid) VALUES ((ALL EVENT ID's) , 1)?
You can use
While loop in SQL Script. like this..
While @Eventid <= 100
--Insert statement here..
SET @Eventid = @Eventid + 1
Feb 26, 2012 02:28 AM|LINK
insert into event_sanction
select eventid, @sanctionid