我的任务是:选择所有有利可图的航班。
transportation
是有关航班的一般信息。ticket
包括有关机票数量及其费用的信息。
所以我尝试更新列profit
之后发现最赚钱的
但是我得到了一个错误
syntax error(missing operator)in query expression'((tt.cost*(tt.sold_q+tt.booked_q))-(0,2* trans.plan_oil))
FROM transportation trans'
UPDATE transportation
set profit =((tt.cost*(tt.sold_q+tt.booked_q))-(0,2* trans.plan_oil))
FROM transportation trans, transportation.ticket tt
WHERE profit is null
union
SELECT TOP 1
FROM transposition trans
WHERE profit>0
我是新手,所以很高兴能为您提供帮助