2003-04-03
70 reads
2003-04-03
70 reads
This script shows the way, how to remove a time from datetimes.Do not move this code to UDF, it would run at least 6 times slower.
2003-04-03
77 reads
This query will solve problems related to Table structure. Using this query you can have the complete table structure for all the user tables with Table Name, Column Name, Data Type, and Null attributes of a column.You can run this script in Query Analyzer or make use of it in your front-end to give table […]
2003-04-02
5,085 reads
Gives you a list with name of all the tables, number of rows, row length of each table, total reserved space, space used by data, space used by index and unused space.
2003-04-02
185 reads
For performance concerns or when the need arises to do some data manipulation/updates/inserts or any other code that requires a loop, use a table variable instead of the ever expensive cursor.
2003-04-01
497 reads
Finds the last available backup for a specified database (local or remote server), then restores the backup onto an existing database on the local server.The script will kill all non-system processes in the destination database to allow the script to be scheduled at night regardless is anyone is still connected.The logical and physical names are […]
2003-03-31
764 reads
Some time you need to know only Date without Time.This is simple function that allows you truncate datetime field to date only.This function can help you to construct dynamic T-SQL for select date period. P.S. Thanks for ispaleny! Conversion only for real not enough! It is necessary convert to real that correct errors near the […]
2003-03-28
391 reads
Modified the sp_who2 proc provided by Microsoft. This proc takes a dbname or dbid for input, and lists current processes in that database. If no database is provided, the current database is used.
2003-03-28
189 reads
This is a sp_password enhanced by Dmitri Bobkov (see http://www.sqlservercentral.com/scripts/contributions/718.asp) and re-enhanced with a small changes from SQL2kSP3.For SQL Server in Mixed Authentication mode this stored procedure helps to validate users password. Currently this procedure checks for the next requrements: password must have length at least 8 characters plus among them at least one digit […]
2003-03-27
447 reads
User Defined function to parse a string with known delimiters and return back the substing in the position.Takes string,delimiter and position as parameters. Can be used directly in TSQL code.
2003-03-27
326 reads
By Steve Jones
ochisia – n. the fear that the role you once occupied in someone’s life...
This is a quick blog post, mainly so I have the code available if...
Praise whatever deity you believe in, because it’s finally here, a tenant switcher for...
I've read lots of the horror stories about nested views in databases where they're...
Hello! How do I grant a user to read-write to a single database and...
When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?
See possible answers