Please tell me why, when using such a command, only the first numbers that were found are transferred. Let’s say I have an ID “12” with two dates 12.01.23 and 12.09.23 and he takes only 12.01.23 and doubles it on the same ID, instead of moving the next date to the same ID.
update dbo.dateexit set date_exit=b.Date
from dbo.dateexit a inner join dbo.[kar] b on a.id_exit=b.["idname"]
where [Dateexit]<>'0' and Date>='2022-12-01' and Date<'2024-02-06'
receive:
| id | date |
| ——– | ——– |
| 12 | 12.01.23 |
| 12 | 12.01.23 |
I want to get:
id | date |
---|---|
12 | 12.01.23 |
12 | 12.09.23 |
New contributor
Ирина Артюшкина is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.