hi !
how can i do next update ? :
update Table1 set cl001d=cl001d+(select AMOUNT from table2)
*
ERROR at line 1:
ORA-00936: missing expression
Printable View
hi !
how can i do next update ? :
update Table1 set cl001d=cl001d+(select AMOUNT from table2)
*
ERROR at line 1:
ORA-00936: missing expression
"update Table1 set cl001d=cl001d+(select AMOUNT from table2)"
???
can u explain clearly?
update Table1 set cl001d=
(select table1.cl001d+AMOUNT from table2 where ......);
Here is exact update :
Update t_client a
set cl001D = cl001D + (select sum(amount)
from t_fh_fs b
where a.clnbr = b.clnbr
and b.department = 2
)
;
Table T_FH_FS has 1 to n transactions for each row of t_client.
So what's wrong with the suggested update?
update t_client a
set cl001D =
(select sum(amount)+a.cl001D
from t_fh_fs b
where a.clnbr = b.clnbr
and b.department = 2);
Hi,
Like i just said on first request....
1 Update t_client a
2 set cl001D = cl001D + (select sum(amount)
3 from t_fh_fs b
4 where a.clnbr = b.clnbr
5 and b.department = 2
6* )
SQL> /
set cl001D = cl001D + (select sum(amount)
*
ERROR at line 2:
ORA-00936: missing expression
Gosh! Can you please run my update statement. It's not the same as yours, syntax is different and will not raise ORA-0093Quote:
Originally posted by Antonio
Hi,
Like i just said on first request....
1 Update t_client a
2 set cl001D = cl001D + (select sum(amount)
3 from t_fh_fs b
4 where a.clnbr = b.clnbr
5 and b.department = 2
6* )
SQL> /
set cl001D = cl001D + (select sum(amount)
*
ERROR at line 2:
ORA-00936: missing expression
That 's O.K.
thanks a lot !
hasta luego !
"Gosh"??Quote:
Originally posted by jmodic
Gosh! Can you please run my update statement. It's not the same as yours, syntax is different and will not raise ORA-0093
Why Jurij, I've never seen you get so emotional ;)
- Chris