Tables with Identity Columns
Run this script on the Database where you are trying to identify Tables with Identity columns.SQL SERVER 2000 SP3a
2005-11-15 (first published: 2005-10-24)
159 reads
Run this script on the Database where you are trying to identify Tables with Identity columns.SQL SERVER 2000 SP3a
2005-11-15 (first published: 2005-10-24)
159 reads
Hello,Here is a way that help in getting all the table name and rowcount with in a database The use can give the database name and it will show the output for that database.Output can be ordered by name or by number of rows.To use it : Copy the script and run paste in QA […]
2005-11-14 (first published: 2005-10-24)
129 reads
The stored procedure generates insert script for table and column extended properties in the current database. The generated script checks whether a property exists, if it exists, drop it first. The stored procedure assumes table owner is dbo. It can be easily changed to other users.
2005-11-11 (first published: 2005-10-27)
1,948 reads
I often do the following when administering databases "select * from Table where PrimaryKey=value" and find the output in Query Analyzer is inconvenient to view when the table has many wide columns (which is often the case). This script returns a single entry from a table but "transposed" so that the data flows down the […]
2005-11-10 (first published: 2005-10-14)
250 reads
Examining the output of DBCC SQLPERF(UMSSTATS) helps in determining a CPU bottleneck. The output of the command is not handy for further investigation (from a table).This procedure performs a transformation of the results, so it is easy to query and store in a database.
2005-11-04 (first published: 2005-09-20)
1,965 reads
Our business accounting software is Microsoft Business Solutions Solomon IV.which is now being called Dynamics Solomon. You will see specific refernces to this software in this code. I originally developed this to gain faster view of issues we were having with Solomon. This procedure analyzes system tables and looks for blocks. This isfaster than using […]
2005-11-03 (first published: 2005-09-20)
412 reads
SUMMARY:This UDF script takes a text value(nvarchar) and returns a decimal(18,6) number. If the text value can't be interpreted as numeric, the UDF returns NULL.-----------------------------------------------USAGE: SET @MyDecimal = dbo.TextToDecimal('-$123,456.73')@MyDecimal will now be -123456.730000SET @MyDecimal = dbo.TextToDecimal('-$123,4560.73') --bad number format@MyDecimal will now be NULL------------------------------------------------------DESCRIPTION:The ISNUMERIC function incorrectly returns 1 (True) for many non-numeric text values. Even […]
2005-11-02 (first published: 2005-09-20)
200 reads
A user defined function that converts an integer value to an IP address in dot notation format. This is performed by promoting a 32 bit signed integer value to a signed 64 bit bigint and converted to a binary representation of the integer. The purpose of this script is to allow the storage of an […]
2005-11-01 (first published: 2005-09-21)
223 reads
I saw a posting recently of a DBA not being able to truncate a transaction log. I rememberred this script that I had, (downloaded from Microsoft Support many moons ago), which did the job for me. It basically filled the log with data, then truncated and shrank the log. All important points throughout the script […]
2005-10-28 (first published: 2005-09-26)
402 reads
Consider an employee table containing name and age of the employees. Write a script to retrieve the row which contain the details of the employee whose age is 50 and also retrieve the immediate next and previous rows
2005-10-27 (first published: 2005-09-28)
236 reads
By Steve Jones
This was Redgate in 2010, spread across the globe. First the EU/US Here’s Asia...
By John
Today is Christmas and while I do not expect anybody to actual be reading...
By Bert Wagner
Until recently, my family's 90,000+ photos have been hidden away in the depths of...
Comments posted to this topic are about the item UNISTR Escape
Comments posted to this topic are about the item Celebrating Tomorrow
Comments posted to this topic are about the item SQL Art: I Made a...
In SQL Server 2025, I run this command:
SELECT UNISTR('*3041*308A*304C\3068 and good night', '*') as "A Classic";
What is returned? (assume the database has an appropriate collation)
A:
B:
C:
See possible answers