how to display enum value sql server

Solutions on MaxInterview for how to display enum value sql server by the best coders in the world

showing results for - "how to display enum value sql server"
Nick
16 Jan 2020
1SELECT StatusLookup.[StatusName], 
2COUNT(Delivery.DeliveryID) AS Dispatched_Status 
3FROM Delivery 
4JOIN StatusLookup ON Delivery.Status = StatusLookup.StatusID
5WHERE StatusLookup.[StatusName] = 'Dispatched'
6GROUP BY StatusLookup.[StatusName];
7
Stefan
27 Apr 2016
1CREATE TABLE [dbo].[StatusLookup](
2    [StatusID] [int] NOT NULL,
3    [StatusName] [varchar](64) NOT NULL,
4    [StatusDescription] [varchar](max),
5)
6
7INSERT INTO [dbo].[StatusLookup]([StatusID],[StatusName],[StatusDescription]
8VALUES(1, 'Dispatched', 'A dispatched record')
9...
10