2016-06-13 2 views
-1

Visual Studio에서이 쿼리를 실행할 때 "sql 명령이 제대로 끝나지 않았습니다"라는 오류가 발생하지만 plsql에서 오류를 발생시키지 않으면 오류가 발생합니다. 쿼리는 다음과 같습니다sql : sql 명령의 오류가 올바르게 끝나지 않았습니다

select animal_type_id, animal_type_name, animal_name 
from animal natural join animal_type 
where animal_type_id not in (select animal_type_id from animal 
    where animal.recieving_date>(sysdate-365)) 

내가 무엇을 할 수 있습니까? 감사합니다.

+0

어떤 DBMS를 사용하십니까? – Jens

+0

Visual Studio는 데이터베이스 서버가 아닙니다. 어떤 데이터베이스를 사용하려고합니까? NATURAL JOIN은 SQL Server에서 지원되지 않습니다. –

+0

다음은 오라클의이 오류에 대한 문서입니다. [ORA-00933] (http://www.techonthenet.com/oracle/errors/ora00933.php) –

답변

0

Visual Studio에서 SQL을 망가 뜨리는 것처럼 보입니다. 이것은 오라클 관련 질문이 아닙니다.

select animal_type_id from animal where animal.recieving_date>(sysdate-365) 문을 실행하고 올바르게 작동하는지 확인하십시오. 그런 다음 고정 된 수의 animal_type_id를 사용하여 select animal_type_id, animal_type_name, animal_name from animal natural join animal_type where animal_type_id not in - 명령문 만 실행하십시오.

단지 다음을 확인하십시오. 해당 SQL 문을 ;으로 끝 냈습니까? Visual Studio에서 필요로하는지, 더 잘 확인하십시오!

관련 문제