amol shinde

amol shinde

  • NA
  • 253
  • 707

Angular JS Create and display data dynamically

May 9 2016 9:28 AM

1. Stored procedure.

The accounts table is modified according to instructions stored in the action table. Each row in the action table contains an account number, an action to be taken (I, U, or D for insert, update, or delete), an amount by which to update the account, and a time tag used to sequence the transactions.

On an insert, if the account already exists, an update is done instead. On an update, if the account does not exist, it is created by an insert. On a delete, if the row does not exist, no action is taken.

Input Tables

SQL> SELECT * FROM accounts ORDER BY account_id;

ACCOUNT_ID BAL
---------- -------
1 1000
2 2000
3 1500
4 6500
5 500

SQL> SELECT * FROM action ORDER BY time_tag;

ACCOUNT_ID O NEW_VALUE STATUS TIME_TAG
---------- - ---------- -------------------- ---------
3 u 599 18-NOV-88
6 i 20099 18-NOV-88
5 d 18-NOV-88
7 u 1599 18-NOV-88
1 i 399 18-NOV-88
9 d 18-NOV-88
10 x 18-NOV-88


Answers (2)