I have an array in a View.
-
I need to convert it to a VARCHAR so I can use COALESCE function OR can I use Coalesce against an array element directly?
-
Would still like to convert array element to VARCHAR so I could use CASE statement.
Tried
select CAST (USE_OF_PROCEEDS [0] as VARCHAR)
FROM
“External_Data.stage0.3529”.fixedIncomeExtNamrV2_history
where USE_OF_PROCEEDS is not null
Response:
SQL Error: VALIDATION ERROR: Cast function cannot convert value of type RecordType(VARCHAR(65536) useOfProceeds) to type VARCHAR(65536)
SQL Query select CAST (USE_OF_PROCEEDS [0] as VARCHAR)
FROM
“External_Data.stage0.3529”.fixedIncomeExtNamrV2_history
where USE_OF_PROCEEDS is not null