I need to translate the pseudo following into a SQL statement

3 tables linked in a one to many relationship

Table A
a_ID
cost

Table B
b_ID
cost_1
cost_2
*a_ID

if Table A is referenced in Table B then
    return the sum (cost_1 + cost_2) from Table B of all the
referenced records
otherwise
    return cost from Table A

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to