For Discussion
# | Comment | Owner | |
---|---|---|---|
1 | Should Site Number & Name be unique ? | Site name could be duplicated. (The Surgery is a common name for a medical practice) Site number should be unique. | Alistair Pringle (Unlicensed) |
Break down of SiteNumber and SiteName NULL or NOT NULL values;
Code Block | ||||
---|---|---|---|---|
| ||||
select CASE WHEN SiteName IS NULL THEN 'NULL' ELSE 'NOT NULL' END SiteName, CASE WHEN SiteNumber IS NULL THEN 'NULL' ELSE 'NOT NULL' END SiteNumber, status, count(*) from [HEELIVE].[vwSite] group by CASE WHEN SiteName IS NULL THEN 'NULL' ELSE 'NOT NULL' END, CASE WHEN SiteNumber IS NULL THEN 'NULL' ELSE 'NOT NULL' END, status |
SiteName | SiteNumber | status | RowCount |
---|---|---|---|
NOT NULL | NOT NULL | Current | 7419 |
NOT NULL | NULL | Current | 817 |
NOT NULL | NULL | Inactive | 243 |
NOT NULL | NOT NULL | Inactive | 5265 |
Total | 13744 |
There are 12 SiteNames that have been duplicated, of which 5 have a Current Status;
...