I'm using SQL Server 2014. As part of a larger task, I need to detect updates etc from a table so am implementing Hashbytes. The Hasbytes field is defined as varbinary(MAX)
.
This is my SQL:
INSERT INTO tbl_People
SELECT
id,
Name,
Add1,
Add2,
Add3,
HashValue as Hashbytes('MD5',CONCAT('|',Name, Add1, Add2, Add3))
from tbl_PeopleSource
However, I just keep receiving the error:
Incorrect syntax near 'MD5'.
Where am I going wrong?