Translate

Tuesday 25 December 2012

CLR integration in sqlserver

http://www.codeproject.com/Articles/19502/A-T-SQL-Regular-Expression-Library-for-SQL-Server:

Step 1

--Enable CLR Integration
exec sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO


Step 2:

CREATE ASSEMBLY [SqlRegEx] FROM 'C:\Project\SqlRegEx.dll' WITH PERMISSION_SET = SAFE

Step 3:

CREATE FUNCTION [dbo].[ufn_RegExIsMatch]
(@Input NVARCHAR(MAX), @Pattern NVARCHAR(MAX), @IgnoreCase BIT)
RETURNS BIT
AS EXTERNAL NAME SqlRegEx.[SqlClrTools.SqlRegEx].RegExIsMatch

Note:


SELECT dbo.ufn_RegExIsMatch('Hello World', 'w', 1) --Ignores Case
SELECT dbo.ufn_RegExIsMatch('Hello World', 'w', 0) --Case Sensitive


Example:
Find if Extended Acsii value
select * from TableName where dbo.ufn_RegExIsMatch(ColumnName,'[^\u0000-\u007F]',0 )=1

-------------------------------------------------------------------------------------------------------


Remove HTML tags from strings using the SQL Server CLR








Thursday 6 December 2012

SQL Server


ALTER DATABASE Compatibility Level (Transact-SQL) (Ex: Enable pivot table)

ALTER DATABASE database_name 
SET COMPATIBILITY_LEVEL = 100

Note: 
        80 = SQL Server 2000 
        90 = SQL Server 2005 
        100 = SQL Server 2008 and SQL Server 2008 R2
        110 = SQL Server 2012

Wednesday 5 December 2012

XCode for MAC

The Xcode developer tools package provides everything you need to create great applications for Mac, iPhone, and iPad.

The Xcode toolset includes the amazing Xcode IDE, with the Interface Builder design tool and Apple LLVM compiler fully integrated. 




Xcode IDE:


Designed from the ground up to take advantage of the newest Apple technologies, Xcode integrates all the tools you need. The unified interface smoothly transitions from composing source code, to debugging, and even to designing your next stunning user interface, all within the same window.

The Xcode workspace is all about keeping you focused. As you type, Live Issues will immediately alert you to coding mistakes, displaying a message bubble beside your code for more detail. Hit the Run button to launch your Mac app, or upload the app to your test device, and immediately start debugging. Hover the mouse pointer above a variable to inspect its value at runtime, never having lost your place in the editor.

Apple LLVM Compiler

Apple’s next generation compiler technology, the Apple LLVM compiler, does more than build your app. Apple LLVM technology is integrated into the entire development experience. The same parser used to build C/C++ and Objective-C powers Xcode’s indexing engine, providing incredibly accurate code completions. As you work, Apple LLVM is constantly evaluating what you type, identifying coding mistakes that Xcode shows as Live Issues, and thinking ahead for ways to Fix-it for you. Other compilers can tell you what is wrong — Apple LLVM can make it right.

That s all....

-> it' s user friendly for mac OS. 
-> Easy to development and so on.....