
  DECLARE  @sourceTanev nvarchar(40)
        ,@targetTanev nvarchar(40)
        ,@tanevId int
        ,@intezmenyId int

--SET @targetTanev='2017/2018'

DECLARE intezmenyCur CURSOR FOR
  SELECT i.ID, tn.ID FROM T_INTEZMENY i
    INNER JOIN T_TANEV tn ON tn.C_INTEZMENYID=i.ID AND tn.TOROLT='F' AND tn.C_NEV IN('2017/2018','2018/2019') AND i.TOROLT='F'

OPEN intezmenyCur
FETCH NEXT FROM intezmenyCur INTO @intezmenyID, @tanevId
WHILE @@FETCH_STATUS = 0
BEGIN
--  SELECT @tanevId=ID FROM T_TANEV WHERE C_NEV=@targetTanev AND C_INTEZMENYID=@intezmenyId
  IF NOT EXISTS (SELECT 1 FROM T_ERETTSEGITANTARGYADATOK WHERE C_TANEVID=@tanevId AND C_INTEZMENYID=@intezmenyId) BEGIN
  /*============INSERT BASED ON : KRETA_1306R==============*/
  INSERT INTO T_ERETTSEGITANTARGYADATOK 
      (C_ERETTSEGISZINT, C_ERETTSEGITANTARGY, C_GYAKORLATMAXPONTSZAM, C_IRASBELIMAXPONTSZAM, C_ISGYAKORLAT, C_ISIRASBELI, C_ISSZOBELI, C_OSSZMAXPONTSZAM, C_SZOBELIMAXPONTSZAM, C_TANEVID, C_INTEZMENYID) VALUES
      (6579, 6591, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId, @intezmenyId),
      (6579, 6603, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6604, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6605, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId, @intezmenyId),
      (6579, 6606, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6607, 0,  0, 'F', 'F', 'T', 50, 50, @tanevId, @intezmenyId   ),
      (6579, 6595, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId), 
      (6579, 6608, 0,  0, 'F', 'F', 'T', 50, 50, @tanevId, @intezmenyId   ),
      (6579, 6609, 60,  60, 'T', 'T', 'T', 150, 30, @tanevId, @intezmenyId),
      (6579, 6610, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6611, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6612, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6613, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6614, 0,  80, 'F', 'T', 'T', 150, 70, @tanevId,@intezmenyId  ),
      (6579, 6615, 0,  80, 'F', 'T', 'T', 150, 70, @tanevId,@intezmenyId  ),
      (6579, 6601, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6616, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6617, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6618, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6619, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId, @intezmenyId),
      (6579, 6620, 0,  0, 'F', 'F', 'T', 50, 50, @tanevId, @intezmenyId   ),
      (6579, 6621, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId), 
      (6579, 6622, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId), 
      (6579, 6623, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId, @intezmenyId), 
      (6579, 6596, 0,  90, 'F', 'T', 'T', 150, 60, @tanevId, @intezmenyId ),
      (6579, 6624, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6598, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6593, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId, @intezmenyId),
      (6579, 6625, 0,  40, 'F', 'T', 'T', 150, 110, @tanevId, @intezmenyId),
      (6579, 6626, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6627, 0,  70, 'F', 'T', 'T', 150, 80, @tanevId, @intezmenyId ),
      (6579, 6628, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6629, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId,@intezmenyId ),
      (6579, 6630, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId,@intezmenyId ),
      (6579, 6631, 0,  80, 'F', 'T', 'T', 150, 70, @tanevId, @intezmenyId ),
      (6579, 6632, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6633, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId, @intezmenyId),
      (6579, 6599, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId, @intezmenyId),
      (6579, 6634, 120,  0, 'T', 'F', 'T', 150, 30, @tanevId, @intezmenyId),
      (6579, 6635, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId, @intezmenyId),
      (6579, 6636, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6637, 0,  50, 'F', 'T', 'T', 100, 50, @tanevId,@intezmenyId  ),
      (6579, 6638, 0,  0, 'F', 'F', 'T', 50, 50, @tanevId, @intezmenyId   ),
      (6579, 6639, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6597, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6640, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6641, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6642, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6643, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId, @intezmenyId),
      (6579, 6644, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6645, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6646, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6647, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6648, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6649, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6650, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6651, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6652, 0,  75, 'F', 'T', 'T', 150, 75, @tanevId, @intezmenyId ),
      (6579, 6653, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId,@intezmenyId ),
      (6579, 6654, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId,@intezmenyId ),
      (6579, 6588, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6589, 0,  100, 'F', 'T', 'T', 100, 0, @tanevId, @intezmenyId ),
      (6579, 6655, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6656, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6602, 0,  50, 'F', 'T', 'T', 100, 50, @tanevId, @intezmenyId ),
      (6579, 6657, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6658, 0,  80, 'F', 'T', 'T', 150, 70, @tanevId, @intezmenyId ),
      (6579, 6659, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6592, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId, @intezmenyId),
      (6579, 6660, 0,  0, 'F', 'F', 'T', 50, 50, @tanevId, @intezmenyId   ),
      (6579, 6661, 0,  90, 'F', 'T', 'T', 150, 60, @tanevId, @intezmenyId ),
      (6579, 6662, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6663, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId,@intezmenyId ),
      (6579, 6664, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6665, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId,@intezmenyId ),
      (6579, 6666, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6667, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId,@intezmenyId ),
      (6579, 6668, 0,  90, 'F', 'T', 'T', 150, 60, @tanevId, @intezmenyId ),
      (6579, 6669, 0,  0, 'F', 'F', 'T', 50, 50, @tanevId, @intezmenyId   ),
      (6579, 6670, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6671, 0,  80, 'F', 'T', 'T', 150, 70, @tanevId, @intezmenyId ),
      (6579, 6672, 0,  80, 'F', 'T', 'T', 150, 70, @tanevId, @intezmenyId ),
      (6579, 6673, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6674, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId,@intezmenyId ),
      (6579, 6594, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId,@intezmenyId ),
      (6579, 6675, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6676, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6677, 0,  80, 'F', 'T', 'T', 150, 70, @tanevId, @intezmenyId ),
      (6579, 6678, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6679, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId, @intezmenyId),
      (6579, 6680, 0,  80, 'F', 'T', 'T', 150, 70, @tanevId, @intezmenyId ),
      (6579, 6681, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6682, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId, @intezmenyId),
      (6579, 6683, 0,  80, 'F', 'T', 'T', 150, 70, @tanevId, @intezmenyId ),
      (6579, 6684, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId, @intezmenyId),
      (6579, 6685, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6686, 0,  90, 'F', 'T', 'T', 150, 60, @tanevId, @intezmenyId ),
      (6579, 6687, 0,  90, 'F', 'T', 'T', 150, 60, @tanevId, @intezmenyId ),
      (6579, 6688, 0,  80, 'F', 'T', 'T', 150, 70, @tanevId, @intezmenyId ),
      (6579, 6689, 100,  0, 'T', 'F', 'T', 150, 50, @tanevId, @intezmenyId),
      (6579, 6690, 0,  75, 'F', 'T', 'T', 150, 75, @tanevId, @intezmenyId ),
      (6579, 6600, 100,  0, 'T', 'F', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6590, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6691, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6692, 0,  117, 'F', 'T', 'T', 150, 33, @tanevId,@intezmenyId ),
      (6579, 6693, 50,  0, 'T', 'F', 'T', 100, 50, @tanevId, @intezmenyId ),
      (6579, 6694, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6695, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6696, 50,  100, 'T', 'T', 'F', 150, 0, @tanevId,@intezmenyId ),
      (6579, 6697, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6698, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6579, 6699, 75,  75, 'T', 'T', 'F', 150, 0, @tanevId, @intezmenyId ),
    
      -- EMELT
      (6580, 6591, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId, @intezmenyId),
      (6580, 6603, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6580, 6604, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6580, 6605, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId, @intezmenyId),
      (6580, 6606, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6580, 6607, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6580, 6595, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6580, 6608, 0,  80, 'F', 'T', 'T', 150, 70, @tanevId,@intezmenyId  ),
      (6580, 6609, 50,  60, 'T', 'T', 'T', 150, 40, @tanevId, @intezmenyId),
      (6580, 6610, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6580, 6611, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6580, 6612, 0,  90, 'F', 'T', 'T', 150, 60, @tanevId, @intezmenyId ),
      (6580, 6613, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId, @intezmenyId),
      (6580, 6614, 0,  75, 'F', 'T', 'T', 150, 75, @tanevId, @intezmenyId ),
      (6580, 6615, 0,  75, 'F', 'T', 'T', 150, 75, @tanevId, @intezmenyId ),
      (6580, 6601, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6616, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6617, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6618, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6619, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6620, 0,  80, 'F', 'T', 'T', 150, 70, @tanevId, @intezmenyId ),
      (6580, 6621, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6622, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6623, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6596, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6624, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6598, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6593, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId, @intezmenyId),
      (6580, 6700, 0,  40, 'F', 'T', 'T', 150, 110, @tanevId, @intezmenyId),
      (6580, 6701, 0,  90, 'F', 'T', 'T', 150, 60, @tanevId, @intezmenyId ),
      (6580, 6626, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6627, 0,  70, 'F', 'T', 'T', 150, 80, @tanevId, @intezmenyId ),
      (6580, 6628, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6629, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6630, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6631, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6632, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6633, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6599, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6634, 120,  0, 'T', 'F', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6635, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6636, 0,  90, 'F', 'T', 'T', 150, 60, @tanevId, @intezmenyId ),
      (6580, 6638, 0,  70, 'F', 'T', 'T', 150, 80, @tanevId, @intezmenyId ),
      (6580, 6639, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6597, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6640, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6641, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6642, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6643, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6644, 0,  90, 'F', 'T', 'T', 150, 60, @tanevId, @intezmenyId ),
      (6580, 6645, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6646, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6647, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6648, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6649, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6650, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6651, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6652, 0,  75, 'F', 'T', 'T', 150, 75, @tanevId, @intezmenyId ),
      (6580, 6653, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6654, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6588, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6589, 0,  115, 'F', 'T', 'T', 150, 35, @tanevId,@intezmenyId ),
      (6580, 6655, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6656, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6602, 60,  60, 'T', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6657, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6658, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6659, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6592, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6660, 0,  0, 'F', 'F', 'T', 50, 50, @tanevId, @intezmenyId   ),
      (6580, 6661, 0,  90, 'F', 'T', 'T', 150, 60, @tanevId, @intezmenyId ),
      (6580, 6662, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6663, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6664, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6665, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6666, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6667, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6669, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6670, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6671, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6672, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6673, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6674, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6594, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6675, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6676, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6677, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6678, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6679, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6680, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6681, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6682, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6683, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6684, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6685, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6686, 0,  90, 'F', 'T', 'T', 150, 60, @tanevId, @intezmenyId ),
      (6580, 6687, 0,  90, 'F', 'T', 'T', 150, 60, @tanevId, @intezmenyId ),
      (6580, 6688, 0,  75, 'F', 'T', 'T', 150, 75, @tanevId, @intezmenyId ),
      (6580, 6689, 100,  0, 'T', 'F', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6600, 100,  0, 'T', 'F', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6590, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6691, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6692, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId ),
      (6580, 6694, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6695, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6696, 50,  100, 'T', 'T', 'F', 150, 0, @tanevId,@intezmenyId ),
      (6580, 6697, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6698, 0,  100, 'F', 'T', 'T', 150, 50, @tanevId,@intezmenyId ),
      (6580, 6699, 0,  120, 'F', 'T', 'T', 150, 30, @tanevId,@intezmenyId )
  END
  FETCH NEXT FROM intezmenyCur INTO @intezmenyID, @tanevId
END
CLOSE intezmenyCur
DEALLOCATE intezmenyCur
