This UDF takes a delimited string and parses it into "words" which are returned as rows in a table. The table returned indicates the position of each element in the source string, and converts values to integer and numeric formats if possible.The script contains examples on how to use the function.the original version was written […]
2005-09-26 (first published: 2004-08-10)
637 reads
This is a function that takes a start date and end date as parameters and returns the number of weekdays (Monday to Friday) in between. This function assumes that Sunday is set as the first day of the week. Adapted from a vb function that I wrote to calculate standard salary costs for billing purposes. […]
2005-09-19 (first published: 2004-10-16)
301 reads
This script will document tables (including constraints and triggers, row counts, sizes on disk), views (including all used fields), stored procedures (including used fields and parameters), database users, database settings and server settings.This script has been cobbled together from several others found on this site, so they deserve the recognition, not me 🙂Simply execute it […]
2005-09-16 (first published: 2004-09-02)
376 reads
Imports data from MySQL Server; works best with mysql driver 3.51.06! You'll have to create a dsn and then a linked server to that dsn. The script checks if the table exists in the mysql catalog (defined in the dsn properties). Too bad it needs administrative privileges to run (dbcc statement) - my advice: don't […]
2005-02-11 (first published: 2005-01-17)
126 reads
select dateadd(dd, datediff(dd,0,Getdate()),0)
2005-02-01 (first published: 2005-01-06)
149 reads
This script will get you the current date minus the time. It will display all zeros instead.DATETIME is stored as a number in SQL and less internal conversions are will be used then other methods. Microsoft generally uses this method.
2005-01-31 (first published: 2005-01-06)
235 reads
SQL Server's Reporting Services comes with some pre-built reports to be able to monitor who is doing what with your Reporting Services Server. You can find these reports in the \Extras\Execution Log Sample Reports folder on the product CD-ROM (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsadmin/htm/arp_rslogfiles_v1_88gy.asp). One of the reports is titled "Todays Reports" (Todays Reports.rdl/pToday Dataset). It should show the […]
2005-01-27 (first published: 2005-01-07)
888 reads
This is a very cool time saving ActiveX Script, run manually from within DTS Designer, that generates date and sequence named backups of the package into the specified development and backup folders. Don't ever lose work again.
2005-01-26 (first published: 2005-01-08)
98 reads
I have found that I can add wildcard support to the Advanced Search Stored Procedure submitted by jgroseth (Posted: 07/02/2004) here:http://www.sqlservercentral.com/scripts/contributions/1201.aspby simply modifying "charindex( c.string," to "patindex('%' + c.string + '%'"I did this to take varying whitespace into account since SQL server does not care about whitespace, for example "INSERT INTO DATABASE_MYTABLE" could have any […]
2005-01-25 (first published: 2005-01-10)
512 reads
Here's a short script to generate a random alphanumeric string based on newid(). The procedure takes in length (@len) which determines the key length. Length must be between 8 and 32. Result is returned in an output parameter. A test script is supplied.
2005-01-24 (first published: 2005-01-10)
1,275 reads