Есть три таблицы: Credit_Rah, Valuta и Cred_zaborg. Valuta связана с Credit_rah, Credit_rah с Cred_zaborg.
Нужно задать Cred_zaborg.Suma_zaborg=Valuta.Kurs*Cred_zaborg.Suma_zaborgVAL
Есть запрос:
select Credit_Rah.Credit_rah, kurs*Suma_zaborgVAL as SumaUAH
into C
from valuta
inner join credit_rah on Credit_Rah.Valuta_name=Valuta.Valuta_code
inner join cred_zaborg on Credit_Rah.Credit_rah=Cred_zaborg.Credit_rah;
update cred_zaborg
set Suma_zaborg = SumaUAH
where cred_zaborg.credit_rah=C.credit_rah
Проблема:
SumaUAH - invalid column name
C.credit_rah - The multi-part identifier could not be bound.
Как ее решить?