-2

I am trying to update data in table ERG_AAB_TEST using data from table DTV_SV. I have written something like this:

UPDATE ERG_AAB_TEST
SET DTV = d.DTV, SV = d.SV
FROM ERG_AAB_TEST AS e, DTV AS d
WHERE e.VNK = d.VNK AND e.NNK = d.NNK 
AND (e.VST + (e.VST - e.BST )/2) >= d.VST 
AND (e.VST + (e.VST - e.BST )/2) <= d.BST;

and got:

SQL Error [42501]: UCAExc:::5.0.0 user lacks privilege or object not found: D.DTV

How can I resolve this problem?

New contributor
Dron_Andron is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • That is not a SQL Server error message. Which DBMS product are you really using (and no, "DBeaver" is not a DBMS, it's a SQL client tool) – a_horse_with_no_name Mar 23 at 17:42
  • Is DTV a valid field name in both tables? Or have you mixed up the field name with the table DTV? – BradC Mar 23 at 18:38

Browse other questions tagged or ask your own question.