Script to print VB.Net properties for the table
Inspired by the script printing c# properties. Made more general.Reuires UDF (it is included).exec vbProp 'Employee'
2006-03-20 (first published: 2006-03-06)
128 reads
Inspired by the script printing c# properties. Made more general.Reuires UDF (it is included).exec vbProp 'Employee'
2006-03-20 (first published: 2006-03-06)
128 reads
this script will generate CREATE index statements for all indexes in the database;there are already scripts out there that script constraints for primary keys and unique constraints, which automatically create an index behind the scenes. but what about the other indexes?uncomment two statements in order to filter out primary keys and Unique indexes so you […]
2006-03-17 (first published: 2006-03-07)
29,283 reads
2006-03-16 (first published: 2004-09-29)
212 reads
SQL Function to calculate number of business seconds between 2 datetime fields. Input Parameters: @startdate - Start Time (datatype DateTime) @enddate - End Time (datatype DateTime) @starthour - Start of Business Day (datatype DateTime) (Format: '1900-01-01 9:00:00') @endhour - End of Business Day (datatype DateTime) (Format: '1900-01-01 17:00:00') @workdays - Business Day string - Use […]
2006-03-15 (first published: 2005-01-17)
241 reads
This version uses the Sieve of Eratosthenes algorithm, which is very fast for moderate upper bounds, but which may be slower than the other versions when the upper bound is very large (because of the overhead of the initial table population)
2006-03-14 (first published: 2003-12-17)
98 reads
This scalar udf takes three parameters @Number INT, @Length INT, @Position CHAR(1) and returns a VARCHAR(50) string which pads @Number with zeros to the specified @Length either to the right or to the left, according to @Position ('L' or 'R').E.g. SELECT dbo.udf_PadNumber(5, 6, 'L') returns '000005' whereas SELECT dbo.udf_PadNumber(5, 6, 'R') returns '500000'. The function […]
2006-03-13 (first published: 2004-08-25)
158 reads
Simple job script to cycle the SQL Log ever 24 hoursThe job is set to disabled as you should review any script that creates a job before enabling it on your server.
2006-03-06 (first published: 2004-10-29)
1,015 reads
Based on Ramesh Kondaparthy's script (Script to Generate DataDictionary for Database, posted 8/5/2005), I made a few format changes and included a few more columns.I modified Ramesh's script so that I could copy the result and paste it into Word as the beginning of a Data Dictionary document. (Hint: Once you've pasted the result into […]
2006-03-01 (first published: 2005-08-12)
509 reads
Probably, many of you know this trick, but I thought it might be useful to people who doesn't know it. This script, when run in query analyzer with text output selected, simply creates property methods code. This example is written for creating property methods for c#. But you can modify it for any language. The […]
2006-02-28 (first published: 2005-04-14)
162 reads
This scipt is inspired by FormatDate - Mimics the VB Format routine for date. But this script work actually only whith a english Server. I improved this by a language independant. I use 2 others functions to retrieve the Long and short month name.
2006-02-27 (first published: 2004-07-23)
201 reads
Today I have uploaded SQL Server Quickie #48 to YouTube. This time I’m talking...
By Ed Elliott
All Spark Connect Posts Introduction There have been quite a few changes in the last...
By Steve Jones
ochisia – n. the fear that the role you once occupied in someone’s life...
Trying to move a database from one sql server instance to another on separate...
Hi All, With previous customer range we were always required to work in the...
Hi all We've got 3 servers with the same setup for dbmail. They...
What do I get as the results from this code?
SELECT CEILING (999.999), CEILING (-999.999);See possible answers