Hello, I need some advice how to to create one big transactional table.
My table has following columns
person_id, trans_id, date, dep_id, material_id, input, outpu, total
I created procedure from which I will enter all transaction into that table. Problem is I don't have any idea how to achive following.
When I enter for example id for paper and input size of 0,5, everything I see is the same counter which is updated for each transaction no matter which material is being updated.
So I need some ideas abou following
How to keep old data in record no matter how many times
I enter some data ?
How to reduce number of input arguments, now I need to specify all values (output_size and total := 0) so I can calculate changes.
How can I add more rigid checks in if statement for example
(if total_size > 0 && output_size == 0) ?
How to keep old data in record no matter how many times I enter some data ?
I did not understand this question!
How to reduce number of input arguments, now I need to specify all values (output_size and total := 0) so I can calculate changes.
PLSQL does support default parameter values.
PROCEDURE proc_name (total IN NUMBER DEFAULT 5) IS ...
OR
PROCEDURE proc_name (total IN NUMBER := 5) IS ...
So you can ignore total from actual parameter list when calling this procedure.
How can I add more rigid checks in if statement for example (if total_size > 0 && output_size == 0) ?
PLSQL does support AND and OR
IF total_size > 0 AND output_size = 0 THEN
statments
ENF IF;