Miscellaneous

Technical Article

Time Hour Dimension

  • Script

Use this script as part of your data warehouse projects. I created this script based on previous postings of the Date/Time Dimension. I wanted a dimension that does hours, minutes and seconds. Includes military and standard hours.

(3)

You rated this post out of 5. Change rating

2005-10-13 (first published: )

5,296 reads

Technical Article

Comprehensive HTML Database Documentation (Revised

  • Script

Getting "Subquery returned more than 1 value" error on cursors. Changed the following in a couple of places and it runs now. systypes.[name], --(SELECT systypes.[name] FROM systypes WHERE xtype = syscolumns.xtype), Mny thanks to whomever wrote the script. Saved me a bunch of effort."This script will document tables (including constraints and triggers, row counts, sizes […]

You rated this post out of 5. Change rating

2005-10-19 (first published: )

591 reads

Technical Article

VBScript to register lots of SQL Servers at once

  • Script

This script will create SQL Server top level groups in EM and then register a bunch of SQL Servers in their respective groups.The script maybe modified to as needed if the user does not wish to create groups. The script currently reads the list of servers tobe registered from a SQL Server database but could […]

You rated this post out of 5. Change rating

2005-10-21 (first published: )

197 reads

SQLServerCentral Article

Use SQL-DMO and Excel to Quickly Create Reports for Auditors

  • Article

Auditing SQL Server, or any system, is not an easy task and with new regulations like Sarbanes-Oxley, it is becoming a full time job in some environments. Chad Miller brings us a way that he developed with Excel and some scripting to automate some of the security information for a large installation of SQL Servers.

(1)

You rated this post out of 5. Change rating

2005-10-04

11,356 reads

Technical Article

Replace script extension PRC with SQL

  • Script

When you tell Enterprise Manager to "Create one file per object" when scripting objects from the database it gives those scripts a PRC extension.Unfortunately SQL Query Analyser defaults to a .SQL extension.The following DOS command renames all .PRC files to .SQL

You rated this post out of 5. Change rating

2005-10-24 (first published: )

450 reads

Technical Article

Generate Upsert Script

  • Script

This script outputs the TSQL code to do perform an 'Upsert'.It depends on both the source & target tables having the same structure and rows being uniquely identified with a single field.Three variables need to be updated prior to execution of this script:@SourceTable: Table containing the data to be upserted@TargetTable = Table to be upserted […]

(1)

You rated this post out of 5. Change rating

2005-10-25 (first published: )

657 reads

Technical Article

To fetch the immediate previous and next row

  • Script

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

(2)

You rated this post out of 5. Change rating

2005-10-27 (first published: )

236 reads

Blogs

Resetting on the AI hype train

By

There's a great article from MIT Technology Review about resetting on the hype of...

A New Word: Etherness

By

etherness – n. the wistful feeling of looking around a gathering of loved ones,...

Vibe Coding a Login Tracking System

By

A customer was asking about tracking logins and logouts in Redgate Monitor. We don’t...

Read the latest Blogs

Forums

T-SQL in SQL Server 2025: The || Operator

By Steve Jones - SSC Editor

Comments posted to this topic are about the item T-SQL in SQL Server 2025:...

Your Value from a Conference

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Your Value from a Conference

UNISTR Basics

By Steve Jones - SSC Editor

Comments posted to this topic are about the item UNISTR Basics

Visit the forum

Question of the Day

UNISTR Basics

What does this code return in SQL Server 2025+? (assume the database has an appropriate collation)

SELECT UNISTR('Hello 4E16754C') AS 'A Classic';
A:   B:  

See possible answers