Thulasiram pakala

Thulasiram pakala

  • 906
  • 872
  • 116.4k

convertion nvarchar to numaric error please

Apr 28 2021 3:35 AM
in this Ounsumer id i got convertion nvarchar to numaric error please any body help
  1. Alter Procedure [dbo].[Proc_ConsumermasterInsert1]  
  2. (@DCM_DeptName nvarchar(100),  
  3. @DCM_Address varchar(200),  
  4. @DCM_MobileNumber varchar(20),  
  5. @DCM_CEOName varchar(50),  
  6. @DCM_EmailID varchar(50),  
  7. @DCM_DeptDescription varchar(200),  
  8. @DCM_AddedBy int,  
  9. @DCM_AddedIPAddress varchar(50),  
  10. @DCM_Remarks varchar(50),  
  11. @DCM_Abbrivation char(5),  
  12. @DCM_CategoryAgencyId int,  
  13. @DCM_ContactPersonName varchar(100),  
  14. @DCM_ContactPersonMobileNumber varchar(15),  
  15. @DCM_ContactPersonEmailID varchar(50),  
  16. @DCM_ContactPersonLandLineNumber varchar(20)  
  17. )  
  18. as begin  
  19. DECLARE @consumerid nvarchar(20)  
  20. Declare @output nvarchar(max)  
  21.   
  22. BEGIN TRANSACTION;  
  23. insert into [dbo].[DataConsumerMaster] (DCM_DeptName, DCM_Address, DCM_MobileNumber, DCM_CEOName, DCM_EmailID, DCM_DeptDescription,  
  24. DCM_DataConsumer, DCM_AddedOn, DCM_AddedBy, DCM_AddedIPAddress, DCM_Status,DCM_Remarks,DCM_EntryMode, DCM_Abbrivation,DCM_CategoryAgencyId,  
  25. DCM_ContactPersonName,DCM_ContactPersonMobileNumber,DCM_ContactPersonEmailID,DCM_ContactPersonLandLineNumber)  
  26. values(@DCM_DeptName, @DCM_Address, @DCM_MobileNumber, @DCM_CEOName, @DCM_EmailID, @DCM_DeptDescription,  
  27. 'A', getdate(), @DCM_AddedBy, @DCM_AddedIPAddress, 'A',@DCM_Remarks,'D',@DCM_Abbrivation,@DCM_CategoryAgencyId,  
  28. @DCM_ContactPersonName,@DCM_ContactPersonMobileNumber,@DCM_ContactPersonEmailID,@DCM_ContactPersonLandLineNumber)  
  29. Select @consumerid= 'CM00'+ SCOPE_IDENTITY()  
  30. --IF EXISTS (SELECT DCM_ConsumerID FROM [DataConsumerMaster] WHERE DCM_DeptName =@DCM_DeptName)  
  31. --Then  
  32. if(@@ROWCOUNT>0)  
  33. --SET @output=  
  34. --PRINT convert(varchar(30), @output)  
  35. --RETURN @output  
  36. Insert into Login88(Password,UserName,Officer_Name,Officer_Mobile,Email_ID,Type_Of_User,Status,Date_of_Creation,created_by,Date_of_Modification,Roles)  
  37. Values('ov2FeiYRwvE=',Convert(nvarchar(50), @consumerid) ,@DCM_CEOName,@DCM_MobileNumber,@DCM_EmailID,4,'Approved','',@DCM_AddedBy,'','C')  
  38. Commit TRANSACTION;  
  39. END  

Answers (2)