I have item master table where rate(selling rate) is defined. However, this rate will get automatically when item is select on Sales items. Now issue is that for example , if select laptop then system will automatically get rate at sales table.
Now if i override rate then system will get old rate on query. Second, thing in order to cater above case that if i apply condition rate bring if rate is change that it will be working fine but one more issue in this is that if change item and rate is already exist then system doesn’t’ bring rate on change itme. item : Laptop, Rate : 50000
Create table Items (item_id number, Item_name varchar2(30), Rate number(8,4))
Create table Sales (invoice_id number, item_id number, rate number, qty number )