Try using “CREATE OR REPLACE VIEW…”
———– kccrosser —-
Each system has a different way of replacing views. Oracle uses “Create or Replace View”, and in some systems it may be easiest just to run a “Drop View xxx”, “Create View xxx” sequence.
As noted below, the “Coalesce” function will give you the desired results. Your view def with the coalesce functions inserted would look like the following. Note that the coalesce for SHPWTYP will return one blank character as coded, since you specified to return a “blank”.
create view PDGRDDV12 as
GDLVL1, GDLVL2, WHFLOC, Coalesce(WHWTYP,’ ‘) as SHPWTYP, GDITEM,
GDSTYL, GDCOLR, GDLOGO, GDSIZ#,
cast(sum(Coalesce(GDSCQY,0)) as dec(7,0)) as GDSCQY,
cast(sum(Coalesce(GDPQTY,0)) as dec(7,0)) as GDPQTY
left outer join ICWAREP on GDWHSI=WHWHSI
where GDSTTS=’5′ or GDSTTS=’6′
group by GDLVL1, GDLVL2, WHFLOC, WHWTYP, GDITEM,
GDSTYL, GDCOLR, GDLOGO, GDSIZ#;