test name
1 a
2 b
3 c
的table 怎么样输出成这样的
test name
1 a
2 a_b
3 a_b_c
用proc sql步!
顺便问问各位前辈!我这样错在哪里???
proc sql;
create table test
(id numeric(10),
name varchar(10),
pid numeric(10)
)
;
insert into test(id,name,pid) values(1,'10',0);
insert into test(id,name,pid) values(2,'11',1);
insert into test(id,name,pid) values(3,'20',0);
insert into test(id,name,pid) values(4,'12',1);
insert into test(id,name,pid) values(5,'121',2);
select * from test start with id=1 connect by prior id=pid;
select * from test start with id=5 connect by prior pid=id;