On Mon, Jul 09, 2018 at 03:28:45PM +0530, Brahmam Eswar wrote:
> I'm trying to reset array element to null.
You can do this in SQL as follows:
SELECT ARRAY(
SELECT CASE e WHEN 'ABC' THEN NULL ELSE e
FROM UNNEST(x) _(e)
)
This should really be going to pgsql-general because to is about ho
Brahmam Eswar schrieb am 09.07.2018 um 11:58:
> I'm trying to reset array element to null. but 3rd line of below snippet is
> giving the compilationĀ error.
>
>
> FOR indx_1 IN array_lower(X, 1)..array_upper(X, 1) LOOP
> IF X[indx_1].REFERENCE_VALUE = 'ABC' THEN
> X[indx_1].REFERENCE_VALUE:='';
>
2018-07-09 11:58 GMT+02:00 Brahmam Eswar :
> I'm trying to reset array element to null. but 3rd line of below snippet
> is giving the compilation error.
>
>
> FOR indx_1 IN array_lower(X, 1)..array_upper(X, 1) LOOP
> IF X[indx_1].REFERENCE_VALUE = 'ABC' THEN
> X[indx_1].REFERENCE_VALUE:='';
> END
I'm trying to reset array element to null. but 3rd line of below snippet is
giving the compilation error.
FOR indx_1 IN array_lower(X, 1)..array_upper(X, 1) LOOP
IF X[indx_1].REFERENCE_VALUE = 'ABC' THEN
X[indx_1].REFERENCE_VALUE:='';
END IF;
END LOOP;
--
Thanks & Regards,
Brahmeswara Rao J.