Table 1
Empaname empid Deptid
kumar 23 1
kumar 23 2
manu 45 3
manju 34 4
manju 34 5
manju 34 6
Table2
Empaname empid Deptid
kumar 23 1
manu 45 3
manju 34 5
여기에 내가 2 테이블 값을 int 값을 테이블 2SQL 쿼리 문제
if exists(select Empid from [email protected] and [email protected] and DEptid<>@intdepID)
Begin
//here both Empname and Empid is matching and DeptID is not matching then do not do anything just return an value as 2
return 2
end
else
begin
//Update the record vales to an Temp Table
end
업데이트 할 필요가 기반으로 비교하는 오전이 테이블을 가지고이 쿼리 쓰고 있어요, 그 조건에 실패하고있다.
어느 누구든지 나를 도와 줄 수 있습니다.
감사합니다.
는 "그것은 실패지고"- 오류가 있거나 당신이 할 기대하지 않습니다? 업데이트 문을 포함하여 정확한 쿼리를 추가 할 수 있습니까? 오류가 발생하는 경우 게시 할 수 있습니까? – rkellerm