I am trying to fetch the some value from column 'data_sent' and then updating column 'registry' with this value. But getting the issues.
Query below:
update can_data
set registry = (SELECT cast(SUBSTR(split_part(data_sent,
'registry>', 2), 1, 26) as numeric)
as registry FROM can_data);
SQL error:
ERROR: more than one row returned by a subquery used as an expression
********** Error **********ERROR: more than one row returned by a subquery used as an expression SQL state: 21000