Showing posts from April, 2010
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 '…
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…
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…
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…
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 '…
---logins: SELECT * FROM sys . server_principals --database users (run in the db) SELECT * FROM sys . database_principals --db roles SELECT dp . type_desc ,…