1
I have a stored file in the database that changes a record of a customer, entering the date on which it will be visited and the interviewer who will make the visit.
CREATE PROCEDURE dbo.Captacao_InsereDadosAgendamento
@DATA_ENTREVISTA DATETIME,
@ENTREVISTADOR NVARCHAR(30),
@CGC NVARCHAR(14)
AS
BEGIN
UPDATE
CLIENTES
SET
DATA_AGENDAMENTO = @DATA_ENTREVISTA,
ENTREVISTADOR = UPPER(@ENTREVISTADOR)
WHERE
CGC = @CGC
END
But when I run the trial, even if I pass the three parameters correctly, I get the following error:
Arithmetic overflow error Converting Numeric to data type Numeric. The statement has been terminated.
None of the parameters of the Procedure or table are of the Numeric type. What do I do to correct that mistake?
What is the type of the date scheduling columns, interviewer and cgc?
– Leonardo Buta
date scheduling is datetime, interviewer is nvarchar(30) and cgc is nvarchar(14)
– Gabic
What are the data being passed on the variables? I believe that the problem may be in datetime. Try to delete it from your trial to take a test
– Leonardo Buta
I tried to pass just the interviewer’s name and it makes the same mistake
– Gabic
Can show how you are calling proc and what values?
– Ronaldo Araújo Alves
I run the Procedure in SQL Manager Lite and pass the parameters directly in the pop-up it opens: https://drive.google.com/file/d/1M5foCBETcb2vxzy5EmbaFybsfdJx4AwO/view?usp=sharing
– Gabic