MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> --exec [dbo].[spr_PhoneFix90days] -- ============================================= ALTER PROCEDURE [dbo].[spr_PhoneFix90days] -- Add the parameters for the stored procedure here AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET ROWCOUNT 0 SET NOCOUNT ON; DECLARE @Count int, @PhoneCount int, @PhonePercent decimal(10,1) SELECT @Count = (SELECT COUNT( *) FROM root_SERV_CALL) SELECT @PhoneCount = (SELECT COUNT( *) FROM root_SERV_CALL WHERE SYMPTOM_CODE = 'PHONE') SET @PhonePercent = cast(@PhoneCount as decimal(10,1))/ cast(@Count as decimal(10,1)) * 100 --SET @PhonePercent = (@PhoneCount/@Count)*100 --SET @PhonePercent = ((@Count * 100)/@PhoneCount) --SET @PhonePercent = @PhoneCount / @Count) --SET @PhonePercent = (@PhoneCount / @Count) * 100 --PRINT @Phonecount -- Insert statements for procedure here SELECT MODEL, SERIAL, CALL_DATE_SCA, REPRESENTATIVE, CALL_ID, CALL_TYPE, SYMPTOM_CODE, PRODUCT, @PhonePercent AS PhonePercent, @PhoneCount AS PhoneCount, @Count AS RCount FROM root_SERV_CALL WHERE (SYMPTOM_CODE = N'PHONE') AND (CALL_DATE_SCA > DATEADD(day, - 90, GETDATE())) --(SYMPTOM_CODE = N'PHONE') AND END
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.