I need to be able to compare Rowversion to be able to detect data changes for an ETL process. I am using SQL Server 2005. The process needs to convert to varchar for comparison. I have trawled the net for some suggestions but I think there is a problem with case sensitivity:
When I run select min_active_rowversion() this is retuned - 0x0000000002514EB9
When I run SELECT sys.fn_sqlvarbasetostr(min_active_rowversion())
0x0000000002514eb9 is returned which is a different value to that returned by min_active_rowversion()
Is there a process that I can use to be able to return the value of min_active_rowversion() as a varchar?
And vice-versa to reconvert.
declare @rowversion rowversion
set @rowversion = 0x0000000002514EB9
select cast(cast(@rowversion as bigint) as varchar(19))