Skip to content
Advertisement

Didnt print on Procedure on SQL

So I try to print a message when I have any confirmation or error. I have this table [Friendship] that have the ID, friend mail, their mail and the date that have been confirm the friendship,

Table without data

1

When I use the EXEC for this PROCEDURE, I have the insert values, but not the print´s acctions… Also, If I try to use the same mails, also insert the values. Didnt check the condition

EXEC dbo.pFriendship 'mailTest@hotmail.com', 'mailTest2@gmail.com'

Confirm insert without any use of Print of my PROCEDURE

2

What I was hoping for is like

Or the error at @@ERROR or the equals mails error (if applied)

Advertisement

Answer

Just remove the last else

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement