'Presto SQL filter by data type in where clause
I have a column, which should be VARCHAR; I need to cast these as doubles. Some values, however, are Booleans and trigger the error Cannot cast false to DOUBLE. How do I prevent this is the WHERE cause?
What's the easiest way to accomplish the below in presto?
...
WHERE Type(col) != BOOL
Or
...
WHERE type(col) = VARCHAR
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
