I'm writing a query to pull some data and running into this invalid input syntax for type double precision: "null" error and am not entirely sure the meaning behind it and/or haven't figured out a solution. The column I'm running the case statment on does have null values in it or it has the appropriate value that i need.
account id col could have strings or it has null values
I've tried:
case
when length(account_id) > 1
then account_id
else
'null'
end as account_id,
and
case
when account_id is not null
then account_id
else
'null'
end as account_id,
both resulting in Invalid operation: invalid input syntax for type double precision: "null";
When i just put this in a column and use the length(account_id) it will show the length or just display null - why wouldn't this work in a case statement?
Thanks!
'null'
as in a string, not asNULL
– Lamakaccount_id
? It's complaining isdouble precision
. – The Impaler