Hello Every One,
I have With clause and it is returning multiple results. I want to use this WITH statement( which calculates sal on diff criteria) for UPDATION of table. How can I use it ? Or do I have to use pl/sql for the calculation and the update statement. as it is returning Multiple rows for each ID1 and ID2.
Can any one please suggest me with small sample code.
How to use WITH clause to update the table
It has three column Composit key. ID!,ID2,Name
I want to update sal of each row depending on row retuned by with clause
The below code is just to show what I need to do..
Update emp x set sal=
(with with_sal as
(select id1,id2,name,sal from emp)
select sal from with_sal
where x.id1=with_name.id1
AND x.id2=with_name.id2
AND x.name=with_name.name
)
Thank you in advance
null