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

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

162 reads

Blogs

Clustering SAP #ASCS and #ERS on #AWS using Windows Server Failover Clustering

By

When ensuring high availability for SAP ASCS and ERS running on WIndows Server, the...

Heading Font Weights and List View Toggles Arrive in Block Editor and WordPress 5.8

By

With the WordPress 5.8 release, we're starting to introduce features that overall improve your...

My Application is Getting SQL Timeout Errors, But What Query is the Problem?

By

This is something that comes up time and time again. A developer or member...

Read the latest Blogs

Forums

Get charges percentage per entity\channel

By Bruin

I trying to figure out what percentage of the total charge for a ME...

How to find islands and get max and min range values

By itlk

I am trying to create groups for each Name and save the max and...

FISCAL_WEEK from 1 Jan till First Friday

By birajdarmm@gmail.com

Hi, We have one requirement. Wee need to create a fiscal_week column in SQL_server...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers