Welcome To Snipplr


Everyone's Recent SQL Snippets



1 ... 7 8 9 10 11 ... 18
0 643 posted 13 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 652 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 1573 posted 13 years ago by emregulcan
Cronjob and PHP examples below
0 692 posted 13 years ago by sdxxx
My Drop Column.sql This template drops a columns of the table.
0 648 posted 13 years ago by edwinet
My Add Column Varchar.sql This template adds a new varchar column to the table.
0 719 posted 13 years ago by edwinet
After transferring a magento databse or restoring one, you'll most likely have to run this code to correct a few IDs that change automaticly.
0 609 posted 13 years ago by JustMadMike
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 697 posted 13 years ago by ezerick
0 667 posted 13 years ago by ashsa
1 716 posted 13 years ago by samwa
Search SQL Server field names and stored procedure text, based on a keyword.
1 1044 posted 13 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 601 posted 13 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 1041 posted 13 years ago by Onfire60
Get table schema with columns via sql.
0 693 posted 13 years ago by djmornyc
1 786 posted 13 years ago by samwa
1 865 posted 13 years ago by samwa
1 671 posted 13 years ago by titosemi
1 624 posted 13 years ago by titosemi
0 708 posted 13 years ago by metoikos
How to Export Data From SQL Server to Microsoft Excel Datasheet
0 1036 posted 13 years ago by derebus
Truncates a DateTime value.
0 525 posted 13 years ago by cdicarlo
1 ... 7 8 9 10 11 ... 18