Can someone help me work through this query please?
I'm trying to copy data from one table to another where the destination field isn't null or empty.
The two tables are tblWeights (source table) and dbo_ARHistory (destination). Here's my idea.
UPDATE dbo_ARHistory INNER JOIN tblWeights ON dbo_ARHistory.chst_id = tblWeights.cbox_id
if dbo_ARHistory.chst_weight IS NOT NULL or dbo_ARHistory.chst_weight <> "" then
SET dbo_ARHistory.chst_weight = tblWeights.cbox_weight
from dbo_ARHistory, tblWeights
WHERE dbo_ARHistory.chst_order=tblWeights.cbox_order;
Any Ideas?