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

199 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,358 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: )

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

237 reads

Blogs

Runing tSQLt Tests with Claude

By

Running tSQLt unit tests is great from Visual Studio but my development workflow...

Getting Your Data GenAI-Ready: The Next Stage of Data Maturity

By

I remember a meeting where a client’s CEO leaned in and asked me, “So,...

Learn Better: Pause to Review More

By

If you want to learn better, pause more in your learning to intentionally review.

Read the latest Blogs

Forums

Execute Process Task: Issues encrypting text file using PGP in SSIS 2022

By Lord Slaagh

Hello SSC, Has anyone encountered this before??? I have an odd issue that I...

Azure SQL DBA certification

By ashrukpm

Hello team Can anyone share popular azure SQL DBA certification exam code? and your...

Faster Data Engineering with Python Notebooks: The Fabric Modern Data Platform

By John Miner

Comments posted to this topic are about the item Faster Data Engineering with Python...

Visit the forum

Question of the Day

Which Result II

I have this code in SQL Server 2022:

CREATE SCHEMA etl;
GO
CREATE TABLE etl.product
(
    ProductID INT,
    ProductName VARCHAR(100)
);
GO
INSERT etl.product
VALUES
(2, 'Bee AI Wearable');
GO
CREATE TABLE dbo.product
(
    ProductID INT,
    ProductName VARCHAR(100)
);
GO
INSERT dbo.product
VALUES
(1, 'Spiral College-ruled Notebook');
GO
CREATE OR ALTER PROCEDURE etl.GettheProduct
AS
BEGIN
    exec('SELECT ProductName FROM product;')
END;
GO
exec etl.GettheProduct
When I execute this code as a user whose default schema is dbo and has rights to the tables and proc, what is returned?

See possible answers