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.

5 (3)

You rated this post out of 5. Change rating

2005-10-13 (first published: )

5,281 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: )

584 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: )

191 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.

5 (1)

You rated this post out of 5. Change rating

2005-10-04

11,354 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: )

443 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 […]

5 (1)

You rated this post out of 5. Change rating

2005-10-25 (first published: )

650 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

1 (2)

You rated this post out of 5. Change rating

2005-10-27 (first published: )

230 reads

Blogs

The CDO’s Playbook for AI Driven Decision Making

By

The New Arena of Leadership The role of the Chief Data Officer is no...

sp_snapshot – The easy way to take database snapshots of one or more databases – V3.0

By

Presenting you with an updated version of our sp_snapshot procedure, allowing you to easily...

SELECT *

By

SELECT * feels convenient, but in SQL Server it bloats I/O, burns network bandwidth,...

Read the latest Blogs

Forums

combining a param value with widcards in a foreach loop files property

By stan

Hi, it isnt clear from the web if something like this should work as...

Extract sql data in psh

By Sqladmin1

# Load ImportExcel module Import-Module ImportExcel -ErrorAction Stop # File paths $outFile = "C:\Reports\SQLReport.xlsx"...

caught off guard by some greek lettering in a warehouse feed

By stan

Hi we run 2019 standard.   Our warehouse's ssis based etl is klunky but so...

Visit the forum

Question of the Day

Vector Datatype

The new Vector datatype in SQL Server 2025 is a binary type that has a few parameters. What parameters are required?

See possible answers