たとえば、
CREATE VIEW AIPKEYITEM.SEASONGROUPNETSALES (
CALENDARID ,
PRODUCTGROUPID FOR COLUMN PRDGRPID ,
NETSALESDOLLARS FOR COLUMN NETSA00001 ,
NETSALESUNITS FOR COLUMN NETSA00002 )
AS
SELECT
(SELECT MIN(CALENDARID)
FROM AIPKEYITEM.KEYIT00002
WHERE FISCALYEAR = CAL.FISCALYEAR
AND FISCALSEASON = CAL.FISCALSEASON) CALENDARID
, PRODUCTGROUPID
, SUM(NETSALESDOLLARS) NETSALESDOLLARS
, SUM(NETSALESUNITS) NETSALESUNITS
FROM AIPKEYITEM.KEYIT00002 CAL
INNER JOIN AIPKEYITEM.WEEKG00001 WEEKGROUPORGUNITUNITSDOLLARS
ON CAL.CALENDARID = WEEKGROUPORGUNITUNITSDOLLARS.CALENDARID
GROUP BY CAL.FISCALYEAR, CAL.FISCALSEASON, PRODUCTGROUPID ;
上記の例では、FOR COLUMNのある行から単語全体を削除したいと思います。
答え1
どうですか?
cat myscript | sed 's/FOR COLUMN.*$//g' > myscript.filtered
myscript
上記のファイル名はいつですか?これがあなたが達成することを望むものですか?