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,280 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: )

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

649 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

Solving SQL Server Mysteries with a Whole Gang of Sleuths -Scooby Dooing Episode 4

By

One thing I’ve always loved about the Scooby-Doo cartoon is that he never solved...

SQL Server Availability Groups

By

Flexibility and Scale at the Database Level When SQL Server 2012 introduced Availability Groups...

Modify Power BI page visibility and active status with Semantic Link Labs

By

Setting page visibility and the active page are often overlooked last steps when publishing...

Read the latest Blogs

Forums

Password Guidance

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Password Guidance

Using table variables in T-SQL

By Alessandro Mortola

Comments posted to this topic are about the item Using table variables in T-SQL

Azure elastic query credential question

By cphite

I am trying to check out elastic query between two test instances we have...

Visit the forum

Question of the Day

Using table variables in T-SQL

What happens if you run the following code in SQL Server 2022+?

declare @t1 table (id int);

insert into @t1 (id) values (NULL), (1), (2), (3);

select count(*)
from @t1
where @t1.id is distinct from NULL;
 

See possible answers