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)
Related Contents:
- How can I do an UPDATE statement with JOIN in SQL Server?
- Select top 10 records for each category
- Convert Month Number to Month Name Function in SQL
- Add a column with a default value to an existing table in SQL Server
- Selecting COUNT(*) with DISTINCT
- Is there any difference between IS NULL and =NULL
- Generate a resultset of incrementing dates in TSQL
- sql query to return differences between two tables
- Using the result of an expression (e.g. Function call) in a stored procedure parameter list?
- Passing an array of parameters to a stored procedure
- Dynamic SELECT TOP @var In SQL Server
- Better techniques for trimming leading zeros in SQL Server?
- Select info from table where row has max date
- Concatenate values based on ID
- What’s the best way to select the minimum value from several columns?
- SQL Server : Transpose rows to columns
- Fastest way to update 120 Million records
- SQL server query to get the list of columns in a table along with Data types, NOT NULL, and PRIMARY KEY constraints
- Splitting delimited values in a SQL column into multiple rows
- Is it possible to select sql server data using column ordinal position
- How to check which locks are held on a table
- Insert Picture into SQL Server 2005 Image Field using only SQL
- SCOPE_IDENTITY() for GUIDs?
- Hierarchical data in Linq – options and performance
- SQL Server – transactions roll back on error?
- Delete duplicate records from a SQL table without a primary key
- SQL – Subtracting a depleting value from rows
- Search for a string in all tables, rows and columns of a DB
- How can a LEFT OUTER JOIN return more records than exist in the left table?
- How to connect to SQL Server from another computer?
- SQL server select distinct rows using most recent value only
- Column name or number of supplied values does not match table definition
- Script to save varbinary data to disk
- How to compare two dates to find time difference in SQL Server 2005, date manipulation
- How to insert a blob into a database using sql server management studio
- Is it possible to perform multiple updates with a single UPDATE SQL statement?
- How do I group on continuous ranges
- What’s the best to check if item exist or not: Select Count(ID)OR Exist(…)?
- SQL GROUP BY CASE statement with aggregate function
- Paging SQL Server 2005 Results
- SQL comma-separated row with Group By clause
- Insert all values of a table into another table in SQL
- How to split string using delimiter char using T-SQL?
- SQL Server PIVOT perhaps?
- Can an INNER JOIN offer better performance than EXISTS
- SQL server identity column values start at 0 instead of 1
- SQL, How to Concatenate results?
- Performance of SQL Server 2005 Query
- unpivot with dynamic columns plus column names
- Is it possible to execute a text file from SQL query?