Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
sql_server 217
t-sql 211
tsql 116
sqlserver 96
BRH 78
#SQLServer 66
#TSQL 56
SQL Server 34
function 11
SSMS 9

Archive · View All
August 2007 17
August 2010 8
June 2012 7
June 2011 7
November 2007 7
August 2012 6
May 2012 6
November 2011 6
August 2011 6
October 2011 6

Madhivanan's TSQL Blog

Is_guid function

May 30 2011 6:26AM by Madhivanan   

The unique identifier datatype is used to uniquely identify a row across various databases in the network. The value has 36 characters inclusive of digits from 0 to 9,alphabets from A to F and hypen. Suppose you have a string of 36 characters and want to know if it is really an uniqueidentifier. You can use either of these methods

Method 1

declare @uid char(36)
set @uid='6F9619FF-8B80-D011-B42D-00C04FC964FF' 
select 
	case when @uid like 
	'[0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]-[0-9A-F][0-9A-F][0-9A-F][0-9A-F]-[0-9A-F][0-9A-F][0-9A-F][0-9A-F]-[0-9A-F][0-9A-F][0-9A-F][0-9A-F]-[0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]' 
	then 
		'yes' 
	else 
		'no' 
	end
	

Method 2

declare @uid char(36)
set @uid='6F9619FF-8B80-D011-B42D-00C04FC964FF' 
select 
	case when @uid like 
		replicate('[0-9A-F]',8)+'-'+
		replicate('[0-9A-F]',4)+'-'+
		replicate('[0-9A-F]',4)+'-'+
		replicate('[0-9A-F]',4)+'-'+
		replicate('[0-9A-F]',12) 
	then 
		'yes' 
	else 
		'no' 
	end
	

Tags: t-sql, sql_server, sqlserver, tsql, BRH, uid, uniqueidentifier,


Madhivanan
3 · 40% · 12924
1
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

1  Comments  

  • Thanks for sharing

    commented on Jun 21 2011 10:54PM
    Hardik Doshi
    20 · 9% · 2853

Your Comment


Sign Up or Login to post a comment.

"Is_guid function" rated 5 out of 5 by 1 readers
Is_guid function , 5.0 out of 5 based on 1 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]