emregulcan


Member since 03/01/2010

Name: Emre GULCAN

Location: Istanbul

8 snippets

2841 profile views

2 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

emregulcan's Recent SQL Snippets



« Prev 1 Next »
This trigger returns a resultset that includes last inserted record's guid info (uniqueidentifier) If your column is uniqueidentifier and its default value is newid() , you can't get last record id (guid) with @@identity . So, I write a trigger...
1 436 posted 13 years ago by emregulcan
You can see details on http://msdn.microsoft.com/en-us/library/ms178592.aspx , but I try to explain how you throw error with "uniqueidentifier" type parameters. I convert uniqueidentifier to string (nvarchar(50)) and set a variable. "%s" is equal...
0 1277 posted 13 years ago by emregulcan
Today I need Trim() function in sql, but in Sql 2005 there is no function. Because of that I wrote this user (scalar) fuction. It's very basic; -First; it's Right Trim (RTrim()) string - And then Left Trim (LTrim())
0 423 posted 13 years ago by emregulcan
You can run this sql scripts in your database. Firstly it creates a database and after insert records (timezones)
4 734 posted 13 years ago by emregulcan
This snippet just updates your tables which infected "<script> </script>" code blocks. You must update all columns one by one.
2 688 posted 13 years ago by emregulcan
You can use this SP like that; Exec CleanInjection 'INFECTED WORD','CLEAN WORD' (in use : Exec CleanInjection '<script></script>','')
2 647 posted 13 years ago by emregulcan
« Prev 1 Next »