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)
156 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)
156 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)
127 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,942 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)
244 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,962 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)
410 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)
197 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)
221 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)
398 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)
231 reads
By Ed Elliott
SQL Server Management Studio (SSMS) has recently added support for Github Copilot. This is...
By Steve Jones
If it fails where you thought it would fail that is not a failure....
Quite a long title for a short blog post ??While deploying a DACPAC (from...
Comments posted to this topic are about the item A Place where AI Technology...
What happens when I run this on SQL Server 2022 in the AdventureWorks2022 database?
SELECT OBJECT_DEFINITION (OBJECT_ID(N'dbo.uspGetBillofMaterials')) AS [Object Definition]; GOSee possible answers