0

I use HASHBYTES() with SQL server 2012, is there any equivalent with OpenEdge?

example of working code in SQL 2012

SELECT HASHBYTES('MD5',CONCAT(col1, col2)) AS [HashDiff] FROM MyTable

example of what i want achive in progress

SELECT *
FROM OPENQUERY(MyLinkedServerToProgress,'SELECT HASHBYTES(''MD5'',CONCAT(col1, col2)) AS [HashDiff] FROM pub.myTable')

https://learn.microsoft.com/en-us/sql/t-sql/functions/hashbytes-transact-sql

Any clue ?

Thanks

Hugues Gauthier
  • 639
  • 8
  • 18

1 Answers1

0

Try using the MESSAGE-DIGEST function. Does it work for your needs?

FOR EACH myTable:
   myVar = MESSAGE-DIGEST('MD5', myTable.col1 + myTable.col2).
END.
Ian Stewart
  • 635
  • 1
  • 7
  • 20