명령을 조회 할 수 있습니다 테이블에 트리거를 작성하지 않습니다SQL Server는 내가
select * from dbo.hmg_cahplots
반환 9250 행. 존재하지 않는
메시지 8197, 수준 16, 상태 6, 절차 LotUpdateTrigger_tdp, 줄 1 개체 'dbo.hmg_cahplots'또는이 유효하지 않습니다 : 나는 트리거를 만들려고 할 때, 그것은 실패 작업.
트리거 코드는 다음과 같습니다
CREATE TRIGGER dbo.LotUpdateTrigger_tdp ON dbo.hmg_cahplots FOR UPDATE, INSERT
AS
BEGIN
update lot
set lot.hmg_planmodelname = model.hmg_modelname, lot.hmg_thermslotincentive = model.hmg_thermsincentive,
lot.hmg_thermslotincentive_base = model.hmg_thermsincentive_base, lot.hmg_kwlotincentive = model.hmg_kwincentive
from hmg_cahplots as lot inner join i
on lot.hmg_cahplotsid = i.hmg_cahplotsid
inner join hmg_pgecahp as proj
on proj.hmg_pgecahpid = lot.hmg_pgecahplots
left outer join hmg_pgecahpmodels as model
on model.hmg_pgecahpmodelsid = lot.hmg_cahpplanstolotsid
and model.hmg_pgecahpplansid = lot.hmg_pgecahplots
END
나는이 해결하기가 매우 어렵다 의심한다. 네임 스페이스 또는 뭔가를 지정해야한다고 가정합니다. 그러나 SQL Server를 처음 사용하기 때문에이 작업을 시작하는 방법을 모릅니다.
감사합니다 - 팀
나는 관리자에게 # 2를 확인하도록 요청했습니다. MS SQL Server Management Studio Express를 사용하고 있습니다. 나는 문서를 점검하고 내가 master가 아닌 정확한 데이터베이스에 있는지 어떻게 알 수 있는지 알아 보겠습니다. 이것이 테이블인지 뷰인지를 질의 할 수있는 스키마 테이블이 있습니까? –
좋아 ...보기에 트리거를 넣으려고하는 것 같습니다. 내가받은 DB 다이어그램은 잘못되었습니다 ... 그것은 신비를 설명합니다. 도움을 주셔서 감사합니다. –