Re: [SQL] UPDATE in a specific order

2010-12-17 Thread Luiz K. Matsumura
Thanks for reply, Em 16/12/2010 17:58, Jasen Betts escreveu: I need to make update of table1 with data on table2 in the order of id of table2 that looks like EAV. is it? Err, I don´t know so much about EAV, so I think that isn´t. I´m just trying to reproduce a calc in a spreeadsheet. Ther

Re: [SQL] UPDATE in a specific order

2010-12-16 Thread Jasen Betts
> I need to make update of table1 with data on table2 in the order of id > of table2 that looks like EAV. is it? > I=B4m trying to do an update like this: that's not going to work. perhaps you can rewrite the from part to only return one row for every table1_fk, this one row will combine seve

[SQL] UPDATE in a specific order

2010-12-16 Thread Luiz K. Matsumura
Hi, I have a follow scenario: CREATE TABLE table1 ( id integer , vlpr numeric(10,2) , vlab numeric(10,2) , vlbx numeric(15,5) , pct numeric(12,8) ); CREATE TABLE table2 ( id integer , fk_table1 integer , tpop char(2) , valor numeric(15,5) ); insert into table1 VALUES ( 1, 200 , 0 , 0