Trouble with UNION ALL in SP
Posted in 1997
This is a segment from the SP:
foreach
select empnum
into mEmpnum
from member m, grpdist gd
where m.grpnum = gd.grpnum and gd.sopnum = mSopnum and
empnum not in
(select empnum from comp where svnum = mMaxSvnum)
union all
select empnum
from usrdist
where sopnum = mSopnum and
empnum not in
(select empnum from comp where svnum = mMaxSvnum)
insert into comp (svnum, empnum, isprinted)
values (mMaxSvnum, mEmpnum, "N");
end foreach
This should be giving me several rows with the same 'empnum' but it does
not. In fact, when I adapted this to run as a 4GL, I got what I was
expecting.
My system is OnLine 7.23.UC1 on SCO OS5.0.4.
Am I missing something here?
Edwin Babadaglian
edwinb@panix.com