Skip to content
Advertisement

Not able to resolve “Numeric Value ‘-‘ is not recognized” error in Snowflake SQL Query

I’m working on converting the sql query below over to Snowflake, and got the error “Numeric Value ‘-‘ is not recognized” but it did not have a line number. I assume it’s in reference to the various “-1” instances throughout the query but there’s no line referenced so it’s unclear what’s causing the problem. If it’s the various references to “-1” – what is the alternative in Snowflake? Try_To_Number won’t work in this case, so hoping community has suggestions

Advertisement

Answer

As David hinted in the comments, this line gives you that error:

Fixed:

As seen in the original query:

(and other concatenations with +, they should be ||)

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