-
Update
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?
Cheers!
OraKid.
-
update Table1 set cl001d=
(select table1.cl001d+AMOUNT from table2 where ......);
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
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);
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
UPDATE
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
-
Re: UPDATE
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
Gosh! Can you please run my update statement. It's not the same as yours, syntax is different and will not raise ORA-0093
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
That 's O.K.
thanks a lot !
hasta luego !
-
Re: Re: UPDATE
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
"Gosh"??
Why Jurij, I've never seen you get so emotional
- Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|