Re: Dynamic update statement ......

From: DanHW <danhw_at_aol.com>
Date: 03 Aug 1999 05:14:09 GMT
Message-ID: <19990803011409.01161.00002609_at_ng-xc1.aol.com>


>Hello, theres,
>
> I have a table A with 41 columns, the table's layout
> as follows
>
> op_date date,
> N1 varchar2(1), /* flag column */
> N2 varchar2(1),
> N3 varchar2(1),
> .....
> N40 varchar2(1)
>
> I want to update the flag column Nx determined by
> the value stored in TABLE B,
> B's layout is
>
> op_date date,
> n1 number(2),
> n2 number(2),
> n3 number(2),
> n4 number(2)
>
>For example,
> if B has a record 1999/08/01,3,5,7,9
> then the table A should have the record
>
> 1998/08/01,0,0,1,0,1,0,1,0,1,0,0......0
> just set the 3rd,5th,7th,9th flag to 1
>How to write the code to dynamic update table A according
>to the values stored in B ??
>
>Any idea??
>Rgds,
>Agi Chen
>
>
>
>
>

Use dynamic SQL (DBMS_SQL package)

Dan Hekimian-Williams Received on Tue Aug 03 1999 - 07:14:09 CEST

Original text of this message