Thread: Problem

Problem

From
Hitesh Kumar Gulati
Date:
How to update a particular element of a field of data type array .
I am using update and set combined statement .It is accepting but it is
not displaying with select statement.
--  create table test(
                          shotno      int4 not null,
                          data        int2[],
                          constraint chk_shot check(shotno >= 0)
                       );
     update test set data[1]= %d where shotno=2929;


                    Hitesh kumar Gulati
                    E-mail-:hkg@plasma.ernet.in
                    Ph. (079)-2864023 (O)
                    Engineer - SC
                    Institute For Plasma Research
                    Near Indira Bridge
                    Bhat Gandhinagar(GUJARAT)

Re: Problem

From
Hitesh Kumar Gulati
Date:
How to update a particular element of a field of data type array .
 I am using update and set combined statement .It is accepting but it is
 not displaying with select statement.
       create table test(
>                           shotno      int4 not null,
>                           data        int2[],
>                           constraint chk_shot check(shotno >= 0)
>                        );
>      update test set data[1]= %d where shotno=2929;
>                                         Hitesh kumar Gulati
>                                         hkg@plasma.ernet.in
>
>