Technical Article

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

847 reads

Technical Article

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

164 reads

Blogs

Daily Coping 3 Feb 2023

By

Today’s coping tip is to ask other people about things they’ve enjoyed recently I...

Daily Coping 2 Feb 2023

By

Today’s coping tip is to challenge negative thoughts and look for the upside. I’m...

Deadline for Microsoft MVP contributions is 20 March 2023

By

Since changing to the new MVP renewal model, Microsoft MVPs have had until 31...

Read the latest Blogs

Forums

Configuring Fargate task duration

By akarjendo

Hi everyone! I've been working with a Fargate app recently and I've managed to...

Coding Magic Values

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Coding Magic Values

How to Check previous data loaded records vs current day in a table

By Zond Sita

Hello Good Morning, I have three Tables, Assume Table1, Table2, Table3 these three tables...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers