Can someone tell me why I get the following error with the code provided?
Msg 4104, Level 16, State 1, Procedure sp_Test, Line 20
The multi-part identifier "#temp.id" could not be bound.
select * into #temp from billtrack where id in(select min(id) from billtrack
group by customer )
update billtrack
set test = 1
where #temp.id = billtrack.id
Msg 4104, Level 16, State 1, Procedure sp_Test, Line 20
The multi-part identifier "#temp.id" could not be bound.
select * into #temp from billtrack where id in(select min(id) from billtrack
group by customer )
update billtrack
set test = 1
where #temp.id = billtrack.id