SQLite Forum

Error Code : Error while executing SQL query on database ‘test’: no such column: price
Lots of misconceptions here.

x) SQLite trigger programs do not have variables. The result column price from the SELECT ist not available to the separate UPDATE statement. Use a subselect to retrieve the price that relates to the row being updated.

x) The UPDATE is going to affect every row of Rental that matches the WHERE clause, not just the NEW row. Use rowid = NEW.rowid instead

x) rental_cost = NULL is always FALSE; nothing is ever equal to NULL, not even NULL. Use IS NULL to check for NULL values.

x) I think you meant to compute (date_out - date_back), not subtract a date from a product of a price and a date.

Edit: Subtracting dates stored as TEXT will probably not yield the expected result.