sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
ibmdb2user's Avatar

SQL query help


Question posted by: ibmdb2user (Newbie) on August 19th, 2008 03:59 AM
Hello all,
I have a table and need to update the FINAL_FFE column based on the following.
FINAL_FFE is FFE divided by count of ASSIGN_ID's in the table.


ID ASSIGN_ID FFE FINAL_FFE

1 ABC123 1.0
1 ABC456 0.5
2 ABC789 0.5
3 ABC123 1.0
3 ABC456 0.5
3 ABC789 0.5
4 ABC123 1.0

After the update statement the table is expected to have the following.

ID ASSIGN_ID FFE FINAL_FFE

1 ABC123 1.0 .333
1 ABC456 0.5 .25
2 ABC789 0.5 .25
3 ABC123 1.0 .333
3 ABC456 0.5 .25
3 ABC789 0.5 .25
4 ABC123 1.0 .333

Thanks in advance.
0 Answers Posted
Reply
Not the answer you were looking for? Post your question . . .
197,038 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,038 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top DB2 Contributors