Welcome To Snipplr


Everyone's Recent SQL Snippets Tagged sql



1 ... 5 6 7 8 9 ... 12
0 1729 posted 14 years ago by iroybot
0 1703 posted 14 years ago by BFTrick
1 1182 posted 14 years ago by samwa
Per cambiare il tipo di dato in una colonna devo fare un giretto...
0 1217 posted 14 years ago by tuffo19
You can use TSQL to Count Number Of Stored Procedures, Views, Tables or Functions in a Database by using the Database INFORMATION_SCHEMA view
0 6488 posted 14 years ago by Mithun
0 1254 posted 14 years ago by hairajeshk
0 1253 posted 14 years ago by kashif21
0 1197 posted 14 years ago by kashif21
this will delete where uniqueField is greater
1 1495 posted 14 years ago by samwa
1 1505 posted 14 years ago by samwa
Find duplicate records regarding a certain field.
0 1103 posted 14 years ago by marvin9000
1 1397 posted 14 years ago by samwa
Similar to "FIND_IN_SET" from MySQL.
0 1481 posted 14 years ago by dotNetkow
(Grabs all info that matches both tables)
0 1046 posted 15 years ago by staley412
0 1208 posted 15 years ago by scholli
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 1165 posted 15 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 2239 posted 15 years ago by emregulcan
My Drop Column.sql This template drops a columns of the table.
0 1140 posted 15 years ago by edwinet
My Add Column Varchar.sql This template adds a new varchar column to the table.
0 1278 posted 15 years ago by edwinet
Field1 + Field2 + Field3 should create 1 entry for each unique row in the DB. In an employee table, this would be FirstName + LastName + EmployeeNumber
1 1286 posted 15 years ago by ezerick
1 1228 posted 15 years ago by samwa
Search SQL Server field names and stored procedure text, based on a keyword.
1 1679 posted 15 years ago by axs221
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 1097 posted 15 years ago by emregulcan
Used the first sql statement to find your menu item. (Replace menu-% with the name of your menu eg. "primary-links" . Then using the menu item id fix the items you want to regain the good old delete button on the menu item.
0 2673 posted 15 years ago by Onfire60
Get table schema with columns via sql.
0 1267 posted 15 years ago by djmornyc
1 1353 posted 15 years ago by samwa
1 1670 posted 15 years ago by samwa
1 ... 5 6 7 8 9 ... 12