DECLARE @uuid VARCHAR(50)
SET @uuid = 'a89b1acd95016ae6b9c8aabb07da2010'
SELECT CAST(
SUBSTRING(@uuid, 1, 8) + '-' + SUBSTRING(@uuid, 9, 4) + '-' + SUBSTRING(@uuid, 13, 4) + '-' +
SUBSTRING(@uuid, 17, 4) + '-' + SUBSTRING(@uuid, 21, 12)
AS UNIQUEIDENTIFIER)
More Related Contents:
- Is it possible to write single query on two table which are not connected to each other?
- How to update two tables in one statement in SQL Server 2005?
- INSERT statement conflicted with the FOREIGN KEY constraint – SQL Server
- SQL query to select dates between two dates
- Create a date from day month and year with T-SQL
- Selecting COUNT(*) with DISTINCT
- Are there any disadvantages to always using nvarchar(MAX)?
- SQL – Subtracting a depleting value from rows
- Turn off constraints temporarily (MS SQL)
- Get the week start date and week end date from week number
- Pass table as parameter into sql server UDF
- conditional unique constraint
- SQL server query to get the list of columns in a table along with Data types, NOT NULL, and PRIMARY KEY constraints
- Is the LIKE operator case-sensitive with SQL Server?
- How to connect to SQL Server from another computer?
- How to insert a blob into a database using sql server management studio
- How can I determine the status of a job?
- unpivot with dynamic columns plus column names
- How to check which locks are held on a table
- Execution sequence of Group By, Having and Where clause in SQL Server?
- Cross Join without duplicate combinations
- How to find sum of multiple columns in a table in SQL Server 2005?
- SQL Script to alter ALL Foreign Keys to add ON DELETE CASCADE
- Is it possible to execute a text file from SQL query?
- Query times out from web app but runs fine from management studio
- SQL . The SP or function should calculate the next date for friday
- Add a row number to result set of a SQL query
- How can I find Unicode/non-ASCII characters in an NTEXT field in a SQL Server 2005 table?
- Sql Server : How to use an aggregate function like MAX in a WHERE clause
- Backup SQL Schema Only?