日期:2014-05-18  浏览次数:20634 次

{"'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+   ' ' &