Hi all,
I am perplexed, I have the following SQL code and it runs fine on it's own, and returns only one result, which should make it OK for filling a variable that I have. Instead, I get the following error...
"Server: Msg 8624, Level 16, State 16, Line 7
Internal SQL Server error."
The variable I am trying to populate is the @AssistID
Here is the query that I am running...
I am perplexed, I have the following SQL code and it runs fine on it's own, and returns only one result, which should make it OK for filling a variable that I have. Instead, I get the following error...
"Server: Msg 8624, Level 16, State 16, Line 7
Internal SQL Server error."
The variable I am trying to populate is the @AssistID
Here is the query that I am running...
Code:
Declare @USERID as Char(15)
set @UserID = 'MHammel'
Declare @Assist as INT
Set @Assist = (select SUM(Case when AssistID <> KDL_User_ID then 1 ELSE 0 END) from vw_3PLActivity WHERE EnterDate= Convert(Char(10),GetDate(),101) and AssistID = @UserID)