Get rid of times as fast as possible!
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
81 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
81 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,154 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
190 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
513 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
772 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
403 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
195 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
457 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
332 reads
When you want to export a table structure to T-SQL, everyone always points you to Enterprise Manager, or a script that calls BCP.Sometimes, a developer either doesn't have access to those tools, or just doesn't want to use them (like me) out of spite.I made this T-SQL because it was educational, and noone else seems […]
2003-03-26
4,030 reads
By Steve Jones
One of the language changes in SQL Server 2025 that I’ve seen a lot...
By Steve Jones
I hosted this month, but I decided to put my own entry in as...
By Chris Yates
I get asked a lot about why or how I began working with databases...
Hi experts, I’ve been going through several articles and videos about Columnstore indexes, but...
Recently stood up a 2022 Enterprise server. Have 8 publications with subscriptions on a...
Hey, I've not done a cube for many years but I find myself supporting...
I get a new SQL Server instance from my build team. How can I tell if the instance was installed using a slipstream installation later?
See possible answers