Find possible missing foreign key relationships

This procedure is intended for single column primary key relationships.First we will create two table functions. The first finds a list of all tables with their primary key columns. The second finds all existing foreign key relationships with their table and column names. Finally we find all tables with primary key column names that do […]

5 (2)

2007-02-26 (first published: )

623 reads

Date String format with optional Timestamp

I find it so annoying to format dates. Sometimes I want to include the timestamp, but if it is a midnight time stamp, the time is irrelevant. Sending in a datetime will return either the date string or a date string with a timestamp up to the seconds with either AM or PM.

5 (1)

2007-01-02 (first published: )

158 reads

Blogs

Arrays in PowerShell–#SQLNewBlogger

By

Another post for me that is simple and hopefully serves as an example for...

Passwords = A Good Thing

By

Those my friends are, in my opinion, one of the single most wonderful things...

Speaking at SQL Saturday Oregon

By

SQL Saturday Oregon — in the city of Portland — is taking place next...

Read the latest Blogs

Forums

Looking for simple non-aggregate version of PIVOT to transpose Rows into Columns

By YSLGuru

I know I've found the answer to this before but I'm having trouble now...

Briefcase Missing Old Functionality

By TUellner

I haven't tried to save anything to my briefcase since the website rebuild. I...

Dynamic Partitions for Flight Data

By barclke

I am parsing 30+ meg binary files, as varbinary(max), containing parameter data from an...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers