Hi,
I need help with populating the column range3 as described below.
range3 is a SUPERSET of columns range1 and range2.Code:create table test (id number, range1 varchar2(20), range2 varchar2(20), range3 varchar2(20)); insert into test values (1, 2000-2002,1999-2001,''); insert into test values (2, 1998,1999-2001,''); insert into test values (3, 1998-2001,2002,''); insert into test values (4, '',2002-2003,''); insert into test values (5, 2000-2001,'',''); commit;
In other words :
for id=1, range3 ought to be = 2000-2002
for id=2, range3 ought to be = 1998-2001
for id=3, range3 ought to be = 1998-2002
for id=4, range3 ought to be = 2002-2003
for id=5, range3 ought to be = 2000-2001
What's a good way to accomplish this?
Thanks, Maddy




Reply With Quote