SELECT convert([nvarchar](255),[CustomId]) as [Id] ,convert([nvarchar](255),[CustomId]) as [CustomId] , convert([nvarchar](255),[DefaultViewUrl])as [DefaultViewUrl] , convert([bigint],[ChildCategory])as [ChildCategory] , convert([nvarchar](255),[Name])as [Name] , convert([nvarchar](255),[Description])as [Description] , convert([bigint],(Select id from InventoryLocation where value=[InventoryLocation]))as InventoryLocation , convert([bigint],[City])as [City] , convert([int],[Quantity])as [Quantity] , convert([decimal](19, 5),[ListPrice])as [ListPrice] , convert([decimal](19, 5),[SalePrice])as [SalePrice] , convert(int,[Status])as [Status] , convert([bigint],(Select id from Shape where value=[Shape]))as Shape , convert([nvarchar](255),[Diameter])as [Diameter] , convert([decimal](19, 5),[Weight])as [Weight] , convert([bigint],[WeightUnit])as [WeightUnit] , convert([bigint],(select id from color where value=[color]))as Color , convert([bigint],(select id from diamondclarity where value=[Clarity]))as Clarity , convert([bigint],(select id from DiamondCut where value=[Cut]))as Cut , convert([bigint],(select id from DiamondPolishing where value=[Polishing]))as Polishing , convert([bigint],(select id from DiamondSymmetry where value=[Symmetry]))as Symmetry , convert([bigint],(select id from DiamondFluorescence where value=[Fluorescence]))as Fluorescence , convert([bit],[IsJIT])as IsJIT , convert([nvarchar](255),[Depth])as [Depth] , convert([nvarchar](255),[Girdle])as [Girdle] , convert([nvarchar](255),[Culet])as [Culet] , convert([nvarchar](255),[PriceQualityIndex])as [PriceQualityIndex] , convert([nvarchar](255),[InvestmentIndex])as [InvestmentIndex] , convert([nvarchar](255),[RecommendIndex] )as [RecommendIndex] , convert([bigint],[Category] )as [Category] , convert([bit],[IsSingleton] )as [IsSingleton] , convert([nvarchar](255),[MeasureMents] )as [MeasureMents] , convert([bit],[IsOrderedAndNoStore] )as [IsOrderedAndNoStore] , convert([bit],[Available])as [Available] , convert([nvarchar](255),([CertType]+':'+[CertNo]))as [Certification1] , convert([nvarchar](255),null)as [Certification2] , convert([nvarchar](255),[LowerHalf])as [LowerHalf] , convert([nvarchar](255),[Starlength])as [Starlength] , convert([nvarchar](255),[PavilionDepth])as [PavilionDepth] , convert([nvarchar](255),[PavilionAngle])as [PavilionAngle] , convert([nvarchar](255),[CrownHeight])as [CrownHeight] , convert([nvarchar](255),[CrownAngle])as [CrownAngle] FROM [NDiamondWebSite].[dbo].[TotalDiamondView]