|
insert into tb_r_interfaces_choi
(interface_seq, device_seq, interface_ip_address)
values
((select b.interface_seq from tb_r_devices a, tb_r_interfaces b where a.device_seq = b.device_seq)
,(select a.device_seq from tb_r_devices a, tb_r_interfaces b where a.device_seq = b.device_seq )
, (select a.ip_address from tb_r_devices a, tb_r_interfaces b where a.device_seq = b.device_seq));
이걸 실행하면 아래와 같은 에러 메시지가 뜹니다.
ORA-01427: 단일 행 하위 질의에 2개 이상의 행이 리턴되었습니다.
변수들이 좀 어려워서 그렇지..간단히 표현하면
insert into test_table (tab1, tab2, tab3)
values((select b.val1 from table1 a, table2 b where a.cval = b.cval),
(select a.val2 from table1 a, table2 b where a.cval=b.cval),
(select a.val3 from table1 a, table2 b where a.cval=b.cal));
이렇다고 할 수 있습니다.
에러나는 원인을 모르겠습니다.
고수님들 좀 도와주세요.
|