-
Sql or PL./SQL question
Hi Guys,
First time post...
I have a requirement which will have to check different combinations to get result.
Example: Assume that the table data looks like this
Col1 Col2 Col3 Col4
1 A 1.5
2 B 0.5
3 C 2.5
4 D 1.5
5 E 0.5
I pass a parameter to the procedure which should update the table like the following. In this case I pass 4 as the parameter and the procedure updates Col4 with EXT where SUM(Col3) = 4. There could be more than 1 combinations, but I just need 1 combination.
Col1 Col2 Col3 Col4
1 A 1.5 EXT
2 B 0.5 EXT
3 C 2.5
4 D 1.5 EXT
5 E 0.5 EXT
6
7
...
Any suggestions?
-John
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
|