执行语句发生错误,语句如下:
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 + ' ' '