0
I have a question and I wanted to ask for your help. Next: I have a proc
and I want when I don’t pass a parameter it returns to me null
and when this happens bring the date of the day -1 and time reset and if it is passed execute normal parameter follows as I was doing.
CREATE PROCEDURE Dbo.AtualizaTMP_Venda(
@IdContrato INT = 1
)
AS
IF @IdContrato = NULL
BEGIN
SELECT CAST(CAST(GETDATE() -1 AS DATE) AS DATETIME)
END
Thank you very much, Deu Certinho :)
– Nidorus