I'm new to stored procedures and I'm supposed to write one which will create an invoice once a booking is made and calculate the total amount for the invoice. The only procedure I need to pass to the procedure is the number of the booking for which I need to create the invoice. A sequence should be used to generate the invoice number.
The attributes in the INVOICE table are: invoice_no, invoice_date, total_amount, due_date and amount_paid.
Could anybody help please?
Are you aware of Oracle's Sequences, I take it from your statement above you are. You can use this to create your Invoice Number. Invoice_Date would just be SYSDATE, the last three fields would need to be passed in or gotten from other sources in your DB.