getpsyched
getpsyched

Reputation: 157

Error when trying to filter input in stream job query

I get the following error when trying to run the query. My goal is to filter the JSON input to be sure only valid events get through. Any thoughts on how i can achieve that?

"Comparison is not allowed for operands of type 'bigint' and 'nvarchar(max)' in expression 'event . Action < > '''."

SELECT
* 
INTO 
   [output]
FROM 
    [input] event 
WHERE
      event.Name <> ' '

Upvotes: 1

Views: 1387

Answers (1)

getpsyched
getpsyched

Reputation: 157

With some more research i realized that the value wasn't a string so the following cast made the trick.

CAST(event.Name AS nvarchar(max)) <> ''

Upvotes: 4

Related Questions