i have this query and i get error in mysql
Error Code: 1054. Unknown column ‘calc_diff_free’ in ‘field list’
I understand the problem, but how can i use this column without changing too much
I filtered the query to hide some data and to help you guys to read the query better
insert into ranking_1 (difference_free)
(
select
f.ranking, rc.ranking,
(-1*(f.ranking-rc.ranking)) as calc_diff_free
from base_testing.ranking_temp f
left join ranking_1 rc
on f.id=rc.id
where 1
)
on duplicate key update difference_free=calc_diff_free
Thanks for your help!!
I think i manage to get it working…
But it’s give me a few warnings…
85672 row(s) affected,Records: 42883, Duplicates: 42789, Warnings: 4