Scripts

Technical Article

Time Hour Dimension

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,221 reads

Technical Article

SQL 2K SMTP mail on Windows 2K

SP_SQLSMTPMail is an OLE automation implementation of the CDOSYS dll for Windows 2000 which utilizes a network SMTP server rather than an Exchange server/Outlook client. The stored procedure functions similar to xp_sendmail including the ability to run a query and attach the results. No MAPI profile is required. It is also a working, detailed example […]

5 (6)

You rated this post out of 5. Change rating

2005-10-12 (first published: )

3,764 reads

Technical Article

Add users to Windows NT Group

This scripts adds the users to the specified Windows NT Group.This will be helpful if we want to give the access to group of users to a sql server, which is runing with Windows Authentication. Create a NT group and give the access on SQL and run this script it adds the user into the […]

You rated this post out of 5. Change rating

2005-10-10 (first published: )

484 reads

Technical Article

Comprehensive HTML Database Documentation (Revised

I took the script from the email you sent me and tested on my machine but i had to correct a few thing because our system is case sensitive. Thanks for the anonymous that wrote that script..... 😉 "This script will document tables (including constraints and triggers, row counts, sizes on disk), views (including all […]

You rated this post out of 5. Change rating

2005-10-07 (first published: )

444 reads

Technical Article

Complex JOIN example (involving FULL, LEFT OUTER)

A table Users contains a Create date column.A table AccessLog contains StartTime column.Both are date time fields.Users table contains one row per user and AccesLog contains as many rows as the number oftimes the user Logged into the system.The requirement is:to produce a single table that has two different COUNTs... one column will have the […]

5 (1)

You rated this post out of 5. Change rating

2005-10-06 (first published: )

1,555 reads

Technical Article

Automated Profiler trace import

This stored procedure was written to complement the automated profiler trace create procedure (should be here somewhere - check the scripts).Bascially, given the database (sample script to create the database included, but you may want to personalize it), this stored procedure will import the tracefile content into the table, which is indexed on expected search […]

You rated this post out of 5. Change rating

2005-10-03 (first published: )

362 reads

Technical Article

Function to parse a delimited string

This UDF takes a delimited string and parses it into "words" which are returned as rows in a table. The table returned indicates the position of each element in the source string, and converts values to integer and numeric formats if possible.The script contains examples on how to use the function.the original version was written […]

5 (1)

You rated this post out of 5. Change rating

2005-09-26 (first published: )

629 reads

Technical Article

Delimited String Parsing and Evaluation Functions

Here's a quick and dirty function for parsing strings based on a delimiter (As in a varchar field with comma delimited text). I'm hoping for feedback on a more efficient means of doing this.Also,4 functions for comparing two delimited lists of strings. Many may ask why these are needed, but that's a very long explanation […]

You rated this post out of 5. Change rating

2005-09-21 (first published: )

254 reads

Blogs

Azure SQL offerings

By

There are three Azure SQL products with so many different deployment options, service tiers,...

T-SQL Tuesday #183 Roundup

By

I hosted this month’s T-SQL Tuesday party with my invitation asking about tracking permissions....

A Little Brainstorming with an AI

By

I was asked to do some a little thinking and brainstorming recently. Rather than...

Read the latest Blogs

Forums

MEMORYBROKER_FOR_RESERVE experience

By tony28

Hi, Does anyone have experience with MEMORYBROKER_FOR_RESERVE ? when suddenly there is somehow constantly...

Moving Database Files

By Ahr Aitch

I just learned that my database was created on my C:\ drive in the...

Migrate MSSQL to MYSQL - Different Servers

By cajun_sql

I am needing to migrate a MSSQL db to MySQL, on a different server...

Visit the forum

Question of the Day

Mixed Backups

I have a complex database with a few filegroups and files. Can I run a backup command like this? (assume file/filegroup names are valid).

BACKUP DATABASE [complex]
    FILE = N'thirdone'
 ,  FILE = N'thirdtwo'
 ,  FILEGROUP = N'second' 
 TO  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL16.SQL2022\MSSQL\Backup\complex.bak' 
 WITH NOFORMAT, NOINIT,  NAME = N'complex-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO

See possible answers