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

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

159 reads

Blogs

Our SQL Server 2019 Administration Inside Out Fun Author Survey

By

SQL Server 2019 Administration Inside Out Honored again to be leading the talented SQL Server...

What's New in SQL 2019? at the Data Architecture Virtual User Group and Q&A followup

By

Thanks to all 180+ of you who joined the Data Architecture Virtual User Group...

My home office setup

By

That aging hippie (he likes Apple products and has a goatee) known as Brent...

Read the latest Blogs

Forums

Recover data log loss

By norleeza23

Hi. I would like to know is it possible to recover data log table...

Execute business rule runtime

By CoolMoon

Hi I have set of hundreds of business rules that I need to executed...

Switching Database context in transaction

By Thomas Franz

Comments posted to this topic are about the item Switching Database context in transaction

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers