Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


#

Comment
Owner
1Should TrustName and Number be unique ?Yes.Alistair Pringle (Unlicensed)

...

Code Block
sql
sql
select CASE WHEN TrustName IS NULL THEN 'NULL' ELSE 'NOT NULL' END TrustName, 
	   CASE WHEN trustNumber IS NULL THEN 'NULL' ELSE 'NOT NULL' END trustNumber, status, count(*) 
from [HEELIVE].[vwTrust]
group by CASE WHEN TrustName IS NULL THEN 'NULL' ELSE 'NOT NULL' END, CASE WHEN trustNumber IS NULL THEN 'NULL' ELSE 'NOT NULL' END, status


TrustNametrustNumberstatusRowCount
NOT NULLNOT NULLCurrent824
NULLNULLCurrent3
NULLNOT NULLCurrent19
NOT NULLNULLCurrent15
NOT NULLNULLInactive107
NULLNULLInactive6
NULLNOT NULLInactive22
NOT NULLNOT NULLInactive1273


Total2269


There are 19 Trust rows that are duplicated

...