Welcome To Snipplr


Everyone's Recent SQL Snippets



This is as small as this can go: 'xs:dateTime(sql:variable("@stringDate"))' It needs to be a literal string for the Value() function. Xml Datatype http://msdn2.microsoft.com/en-us/library/ms189887.aspx Sql:Variable() Function http://ms...
0 1778 posted 18 years ago by rengber
0 1188 posted 18 years ago by therobot
2 1200 posted 18 years ago by micmath
0 1134 posted 18 years ago by rengber
First, create two new fields in your table "Created", and "LastModified" as "datetime" fields, being sure to allow nulls. Then run this code as a query to create triggers that will update the appropriate field when a record is modified, or a record...
1 2656 posted 18 years ago by jeffxl
2 things here. currency (euro) with in a 2.00 format and select entries older than 4 weeks = 28 days
2 1510 posted 18 years ago by assbach
useful if a "valid until" should have an exact ( in this case far future ) value.
0 1095 posted 18 years ago by assbach
1 2097 posted 18 years ago by olive
0 2360 posted 18 years ago by olive
2 1645 posted 18 years ago by berkes
Counts the total amout of nodeviews between now and a year ago (the last 31536000 seconds).
1 1037 posted 18 years ago by berkes
Grab all users that never logged in.
1 1231 posted 18 years ago by berkes
This will return the number of seconds between now and when the time field was inserted.
0 1569 posted 18 years ago by wolfie
0 1083 posted 19 years ago by yuconner
(taking cori comment into account)
0 1234 posted 19 years ago by yuconner
0 1129 posted 19 years ago by yuconner
1 1108 posted 19 years ago by drdamour
mysql -u ''adminusername'' -p
0 1758 posted 19 years ago by yuconner
$ mysql -u ''adminusername'' -p
4 2512 posted 19 years ago by yuconner