当前位置: 代码迷 >> Sql Server >> {"'MCT' 不是可以识别的 OPTIMIZER LOCK HINTS 选项。" }解决办法
  详细解决方案

{"'MCT' 不是可以识别的 OPTIMIZER LOCK HINTS 选项。" }解决办法

热度:264   发布时间:2016-04-27 19:46:47.0
{"'MCT' 不是可以识别的 OPTIMIZER LOCK HINTS 选项。" }
执行语句发生错误,语句如下:
EXEC     (
'INSERT   '   +   @Airline   +   '   (
Departure,
Destination,
FeederRoutingID,
OnlineRoutingID,
InterlineRoutingID,
FeederFareID,
OnlineFareID,
InterlineFareID,
ContractID,
DateFrom,
DateTo,
IsRoundTrip,
Airline)
SELECT   t1.a   as   Departure,t2.a   as   Destination, ' ' '+
@FeederRoutingID   +   ' ' ', ' ' '   +  
@OnlineRoutingID+   ' ' ', ' ' '   +  
@InterlineRoutingID+   ' ' ', ' ' '   +  
@FeederFareID+   ' ' ', ' ' '   +  
@OnlineFareID+   ' ' ', ' ' '   +  
@InterlineFareID+   ' ' ', ' ' '   +  
@ContractID+   ' ' ', ' ' '   +  
@DateFrom+   ' ' ', ' ' '   +  
@DateTo+   ' ' ', ' ' '   +  
@IsRoundTrip+   ' ' ', ' ' '   +  
@Airline   +   '   ' '  
FROM  
(
select   airportcode   As   a   from  
(select   *   from   zone   where   zoneNo= ' ' '   +   @FeederDep   +   ' ' ')Z
INNER   JOIN   ZoneElement   ZE   ON   Z.zoneID=ZE.zoneID
INNER   JOIN   MST_AirPort   A   ON   A.AirPortID=ZE.AirPortID  
)   AS   t1
CROSS   JOIN
( select   airportcode   As   a   from  
(select   *   from   zone   where   zoneNo= ' ' '   +   @Destination   +   ' ' ')Z
INNER   JOIN   ZoneElement   ZE   ON   Z.zoneID=ZE.zoneID
INNER   JOIN   MST_AirPort   A   ON   A.AirPortID=ZE.AirPortID  
)   AS   t2
ORDER   BY   Departure,Destination ')

EXEC(
'INSERT   '   +   @Airline   +   '   (
Departure,
Destination,
FeederRoutingID,
OnlineRoutingID,
InterlineRoutingID,
FeederFareID,
OnlineFareID,
InterlineFareID,
ContractID,
DateFrom,
DateTo,
IsRoundTrip,
Airline)
SELECT   t1.a   as   Departure,t2.a   as   Destination, ' ' '   +  
@FeederRoutingID   +   ' ' ', ' ' '   +  
@OnlineRoutingID+   ' ' ', ' ' '   +  
@InterlineRoutingID+   ' ' ', ' ' '   +  
@FeederFareID+   ' ' ', ' ' '   +  
@OnlineFareID+   ' ' ', ' ' '   +  
@InterlineFareID+   ' ' ', ' ' '   +  
@ContractID+   ' ' ', ' ' '   +  
@DateFrom+   ' ' ', ' ' '   +  
@DateTo+   ' ' ', ' ' '   +  
@IsRoundTrip+   ' ' ', ' ' '   +  
@Airline   +     '   ' '  
  相关解决方案