Showing posts from April, 2010

Splitting CSV string using CTE

DECLARE @CSVString varchar (2000) DECLARE @Delimiter varchar (1) SELECT @CSVString = ' This,is,a,test,for,splitting,using,a,CTE,to,break,a,varchar,into,records,based,on,a,delimiter '…

Some Licensing FAQ

What is a CAL? A CAL is a Client Access License. This type of license grants one network user or device permission to access a network service (such as a SQL or Exchange Server). There are also dif…

Using SET XACT_ABORT

SET XACT_ABORT specifies what action SQL Server should take following run-time errors. The default session setting is SET XACT_ABORT OFF, which indicates that only the Transact-SQL statement that rai…

Formatting Money datatypes

Quite often people ask how to format numeric/money formats in more readable forms separated by commas. The same CONVERT function we use to format the date’s can be used for the same purpose. Only m…

List Object level permissions

SELECT c. action , o.name, b.name FROM sys.objects o INNER JOIN sysprotects c ON o.object_id = c.id INNER JOIN sysusers b ON c.uid = b.uid WHERE o.type IN (' U '…

System views – login/permissions

---logins: SELECT * FROM sys . server_principals   --database users (run in the db) SELECT * FROM sys . database_principals   --db roles   SELECT dp . ty…
Subscribe Our Newsletter