Jeff Moden wrote:
Although there is a solution provided to the OP that works, I have to ask what the original reason is for trying to build a string based GUID base on integer values from somewhere.
very good question, very silly answer lol....
We are migrating data from one customers solution to another customers solution and the target solution cannot be changed (doesn't want to be changed) and must have one of the values we are passing as a GUID. However the value from the source is an INT.
The source doesn't want to add a GUID to the table, and the target doesn't want to create a GUID on import.
Hence the solution above - created a new GUID using NewID and then using the PrimaryKey from the source table to change the final characters.
This is just a one of migration, and explained to everyone involved, that this isn't the right way.
Hopefully that helps.