I have been tasked with something I thought was simple, but apparently its not that simple. I am trying to call a Stored Procedure in UCCX that will do some calculations and returns back an integer value. The stored procedure call I have is:
DECLARE @return_status int
EXEC @return_status = dbo.CTTLoginPhone @CTTId = $EmployeeID , @PIN = $EmployeePIN , @PhoneNumber = $CallingPhoneNumber ;SELECT 'Return_Status' = @return_status
When I run this in this the editor, I get back one row. If I run this in the debugger, I do not get any errors back and the stored procedure runs fine, however the Return_Status is not set either. What am I doing wrong?
I have defined Return_Status with intial value of 0 and the stored proc should be returning back 1 or 2, but the Return_Status remains as 0
Can someone please let me know if I need a DB GET after a DB READ or can I just use the DB READ standalone when calling stored procedure.
All help will be really appreciated.