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.
2005-10-13 (first published: 2005-10-11)
5,280 reads
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 […]
2005-10-19 (first published: 2005-10-07)
584 reads
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 […]
2005-10-21 (first published: 2005-10-05)
191 reads
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
2005-10-24 (first published: 2005-09-30)
442 reads
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 […]
2005-10-25 (first published: 2005-09-30)
649 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)
230 reads
Reviewers: Please disapprove this change, thanks Sorry people, I had deleted this script due to red-gate copyright issue, prior to having the copyright confusion cleared up. I will repost if reqd.
2007-02-15 (first published: 2005-09-21)
192 reads