INVALID_CAST_ARGUMENT: Cannot cast '' to DOUBLE - Error

0

I have been using the below statement to retrieve the sum of all the values from that column as shown below SUM(CAST(column1 AS DOUBLE)) as cnt but now it is erroring out with the below error

INVALID_CAST_ARGUMENT: Cannot cast '' to DOUBLE This query ran against the "imdsout" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 004997cb-e355-445c-b502-28ecd8f8aaaf

질문됨 일 년 전3090회 조회
2개 답변
1
수락된 답변

Hi, does column1 contain empty string? If so it will throw a cast error.

If so, make sure to use where clause to excluded unwanted values such as ‘’.

Hope it helps ;)

profile picture
전문가
답변함 일 년 전
0

Thank you @alatech. Yes it did contain empty string. Once I excluded it works.

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠