Re: OPO : Mailling labels
Date: 1997/01/24
Message-ID: <32E9688C.3984_at_cadvision.com>#1/1
I didn't get an answer and I didn't find the code I was looking for, but I did get it to work.
Say you have a table of names called NAMES with one column NAME. You want to print it on an 8.5x11 sheet with three names across. This is how I did it:
create view X as
select decode(mod(rownum,3),0,name,null) COL1, decode(mod(rownum,3),1,name,null) COL2, decode(mod(rownum,3),2,name,null) COL3from NAMES;
create view COL1 as
select rownum ROWE,COL1 from X where col1 is not null; create view COL2 as
select rownum ROWE,COL2 from X where col2 is not null; create view COL3 as
select rownum ROWE,COL3 from X where col3 is not null;
Now to print across the page you run the query:
select a.col1, b.col2, c.col3
from COL1 a, COL2 b, COL3 c
where a.rowe = b.rowe(+)
and b.rowe = c.rowe(+);
It works.
Wayne Linton Received on Fri Jan 24 1997 - 00:00:00 CET