The situation arises when we are displaying data in a grid or some other control at front end level, where the user is making corresponding changes in the grid and at last when the user click for update button, the whole changes should be posted back to the database. This can be achieved by two […]
2004-11-04 (first published: 2004-08-10)
512 reads
The ability to page in SQL Server is one of those things that everyone wants, but can't quite seem to get from Microsoft. Many ideas have been posted, each claiming to be _the_ way to do it. In the spirit of mine is better than yours, I've implemented my own paging scheme.A feature that is […]
2004-11-01 (first published: 2004-08-13)
1,403 reads
This script creates a table and populates it with information about all dates between a (configurable) start date and end date.It creates a table called MyDates in a database called MyDB in which this is done but the script can be easily edited create the table in whichever DB you want it with whatever name […]
2004-10-28 (first published: 2004-08-20)
328 reads
Here is a simple view that is useful to pull basic data dictionary information out of your DB user tables. The description field is an extended property that I like to use for built in documentation of fields. This only works with 2000, 7 had a slightly different layout for the system tables.
2004-10-27 (first published: 2004-08-20)
333 reads
Updated! Now supports both SQL Litespeed and native backup commands in one script! Several new bug fixes please see the header of the script. Error messages to add are now at the bottom of the script! This stored procedure will backup a single database or all databases it will also perform ether a full, diff, […]
2004-10-26 (first published: 2004-05-27)
985 reads
usp_restore - This will restore a backup performed with SQL LiteSpeed from DBAssocatesIT or by the standard backup database routines in SQL Server Please check below the declarations to find the user settable options for this script If the target database is currently in a loading status or cannot be read from this restore it […]
2004-10-25 (first published: 2004-05-27)
613 reads
A kind of sp_lock with an ORDER BY possibility. It gives also the name of the locked object (table) if executed in the same database.
2004-10-22 (first published: 2004-07-26)
689 reads
This code will show rows from 17th and then next 3 ordered by name from table authors in database pubs. Table must have primary key and of course ordered column. You can change value 'from' in line 'SET ROWCOUNT 17' and value 'next' (how many rows)in line SELECT TOP 3. It is good to show […]
2004-10-21 (first published: 2004-07-29)
195 reads
integer IP-address converted to varchar dot-notationUsage SELECT dbo.IPNumberToString(-2037012288)
2004-10-20 (first published: 2004-07-29)
425 reads
This is a modification to Automate Audit Trigger Generation at http://www.sqlservercentral.com/scripts/contributions/1073.asp by walkerjet. The changes were made to accommodate tables using different types for their primary keys, (i.e. int, smallint, char, etc.), add the ModifiedById and DTStamp columns, exclude legacy tables that do not have a primary key defined, exclude fields of type text, ntext, […]
2004-10-19 (first published: 2004-07-29)
352 reads