Searched by NAVER

알티베이스강좌  :  큐브리드강좌  :  오라클강좌  :  오라클팁  :  오라클사용자팁  :  Oracle Blogs  :  오라클Q&A  :  오라클자료실  :  IT컬럼/소식  :  좋은글감동  :  방명록
Oracle 질문과 답변 oracleclub.com
단순한 insert 문인데..자꾸 에러가 납니다.
한해래 : 2009-09-21 15:41  
주소복사

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));

 

이렇다고 할 수 있습니다.

에러나는 원인을 모르겠습니다.

고수님들 좀 도와주세요.
 

조회수 1477,  추천수 0
글 등 록 글 답 변 글 수 정 목록보기
※ 로그인하여 작성한 글만 삭제할 수 있습니다. 로그인
이름 쓰기
도움 주시는 곳