Generate C# class code for table
For any supplied table, my proc, usp_TableToClass, generates class code in C#, including fields, properties, getters and setters.
2013-12-24 (first published: 2007-11-06)
12,412 reads
For any supplied table, my proc, usp_TableToClass, generates class code in C#, including fields, properties, getters and setters.
2013-12-24 (first published: 2007-11-06)
12,412 reads
This proc generates SELECT, UPDATE, INSERT, and DELETE procs for any given table.
2008-01-02 (first published: 2007-11-08)
1,385 reads
This procedure, sp_who3, is based on the system-supplied sp_who2, but is modified to return the actual text of the commands executed by each spid. Very helpful for troubleshooting! In addition, I have added a @hostname parameter to allow the user the option of viewing activity originating from only one computer, if desired.
2004-05-06
640 reads
IP addresses are represented as xxx.xxx.xxx.xxx, where xxx is an integer between 0 and 255. Each three-digit integer is called an octet, and all IP addresses comprise four octets.Help-desk applications and administrative tools often store the IP addresses for a company's PCs in a database. An IP address can be represented either as a single […]
2004-02-25
2,095 reads
sp_ExecVBScript allows you to execute either a .vbs file or an ad-hoc VBScript command within a T-SQL batch. Note that the command (whether it be ad-hoc or contained in the .vbs file) cannot have any code that requires user input (such as Input Boxes or Message Boxes).
2003-11-05
7,586 reads
New Author! This is a great walkthrough that starts out with a description of the problem and goes all the way to the solution - all using TSQL.
2003-10-30
12,132 reads
Here is a revised version of the crosstab query I submitted last week. This new version avoids the WHILE loop (which was used in my pervious version) and is thus COMPLETELY SET-ORIENTED for better performance.
2003-10-03
763 reads
Crosstab queries (also called "pivot tables") in which you know beforehand the number of column values to aggregate by, can easily be performed in T-SQL using CASE statements wrapped in the SUM function. Where things get tricky, however, is when you don't know how many aggregation values exist, and you are required to write a […]
2003-09-26
3,591 reads
SQL Server includes the COUNT function for counting a table's rows - however, it can be slow. Although querying the "rows" column from the sysindexes table is faster, it is not always accurate (e.g., if a bulk load process has recently taken place). In addition, you would not be able to use this method in […]
2003-09-11
402 reads
SQL 2000's sp_MSForEachDB and sp_MSForEachTable are useful procedures for performing operations against multiple objects; however, they aren't always extremely efficient, because internally they use cursors to do their work.These 2 sprocs, sp_ForEachDB and sp_ForEachTable, perform many of the same tasks as their Microsoft-shipped twins, but run faster because they dynamically build the SQL string without […]
2003-08-19
2,260 reads
By Steve Jones
One of the things that I like about the Data API Builder (DAB) is...
By DataOnWheels
Hey data friends! This blog is to discuss an edge case I’ve run into...
By Steve Jones
I was experimenting with a local model (article) and as a part of this,...
Hi, i have a requirement that involves visiting multiple folders in AD for active,...
I know this, but I do not remember it. I have scoured by saved...
At work we have quite a few databases that I'm frequently browsing. This is...
What are the restrictions for defaults on columns declared as sparse?
See possible answers