CREATE TRIGGER archive_data_iu ON archive_data
FOR INSERT,UPDATE AS
begin
if (select fl_enable from inserted) = 1
begin
insert queue_table (table_name, vdkkey, action)
select 'v_v_archive_data', convert(char(30), inserted.id),'0'
from inserted
end
else
begin
insert queue_table (table_name, vdkkey, action)
select 'v_v_archive_data', convert(char(30), inserted.id),'2'
from inserted
end
end
-------- 에러 메세지 ----
[Error] Script lines: 1-2 --------------------------
Subquery returned more than 1 value. This is illegal when the
subquery follows =, !=, <, <= , >, >=, or when the
subquery is used as an expression.
Msg: 512, Level: 16, State: 1
Server: sybase2, Procedure: archive_data_iu, Line: 4
if (select fl_enable from inserted) = 1 이부분에서 에러가 나는것
같은데.. 어떻게 수정 하여야
하는지 답변 부탁 드립니다..
|