i have 3 tables ,and i have inserted data in table A from tables B and C into it
"my A table has column"
Coe_Code , Coe_name , Sdo_code, Sdo_name
"B table has column"
COE_ID, Coe_Code , Coe_name (COE_ID is auto incremented)
C table has column
Sdo_id ,Sdo_code , Sdo_name, COE_ID (Sdo_id is auto incremented and COE_ID coming from B table )
i have inserted data into B table from A
after that i have inserted data into C by taking column from A and B as you can see column and table above by using this query
[insert into C (Sdo_code,Sdo_name,COE_ID )
select A.Sdo_code,A.Sdo_name,B.COE_ID from A,B where A.Coe_Code =B.Coe_Code
but my problem arise when i need to update my C table ,i need to update only 2 column (Sdo_name,COE_ID ) in C table coming from 2 different table
i tried so many query using inner join with update but was not able to update that..
if some one could help me to provide the query..i also tried this query but didnt work...
[update C set Sdo_code=A.Sdo_code,COE_ID=B.COE_ID from C innerjoin A on A.Sdo_code=C.Sdo_code innerjoin B on C.COE_ID=B.COE_ID]
please provide me the query or help me in what ever way you can
View Complete Post