Есть прилинкованный Infromix. Пытаюсь выполнить код:
insert into depo42.depo.informix.issue_codes (person_id, security_id, issue_code, mode)
select 59957, i.security_id, c.code issue_code, case c.is_active when 'Y' then 0 else 9 end into #tmp1
from v_codes c
join v_sbr s on c.object_id=s.security_id
join depo42.depo.informix.issues i on s.ndc_code=i.security_code
where c.code_type_mn='RTS' |
|
Получаю ошибку:
OLE DB provider 'MSDASQL' reported an error. The provider reported an unexpected catastrophic failure.
[OLE/DB provider returned message: Query cannot be updated because the FROM clause is not a single simple table name.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow returned 0x8000ffff: The provider reported an unexpected catastrophic failure.].
Ладно, пробуем тогда через временную таблицу:
select 59957 person_id, i.security_id, c.code issue_code, case c.is_active when 'Y' then 0 else 9 end mode into #tmp1
from v_codes c
join v_sbr s on c.object_id=s.security_id
join depo42.depo.informix.issues i on s.ndc_code=i.security_code
where c.code_type_mn='RTS'
insert into depo42.depo.informix.issue_codes (person_id, security_id, issue_code, mode) select person_id, security_id, issue_code, mode from #tmp1 |
|
Эффект тот же.
Ладно, пробуем так, вообще без FROM:
insert into depo42.depo.informix.issue_codes (person_id, security_id, issue_code, mode) values (59957,449,'AFLT',0) |
|
Та же фигня.
У кого-нибудь есть какие-нибудь идеи, как это побороть? Поиск в форуме и MSDN ничего не дал.
Заранее спасибо.