ビューを作成しようとしています。これまでのところ、私はこれを書いています:
with ExpAndCheapMedicine(MostMoney, MinMoney) as
(
select max(unitprice), min(unitprice)
from Medicine
)
,
findmostexpensive(nameOfExpensive) as
(
select tradename
from Medicine, ExpAndCheapMedicine
where UnitPrice = MostMoney
)
,
findCheapest(nameOfCheapest) as
(
select tradename
from Medicine, ExpAndCheapMedicine
where UnitPrice = MinMoney
)
CREATE VIEW showing
as
select tradename, unitprice, GenericFlag
from Medicine;
残念ながら、次を含む行でエラーが発生しますCREATE VIEW showing
「CREATE VIEW はバッチ内の唯一のステートメントでなければなりません」
どうすればこれを修正できますか?!