var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Problem with queries
Hello everybody,I am a newbie here.I have a problem with 2 queries in a database I have set up.The database is about a library and it has 4 tables (loan,member,personnel and book).
1)In the loan table there is a field called loan_start_date.According the case of the problem I want to make a query to calculate the return date which must be 3 weeks after the loan_start_date.
2)The second query needs to work out the fines for the overdue books.The fine is 25p per day over the allowed loan time.
I will appreciate your help because I made a lot of queries with the builder but there were all wrong.Thank you very much.
Make an UPDATE Query, it should like something that:
UPDATE loan SET loan.loan_end_date = [loan_Start_date ]+21;
it is almost always not a good idea to store data that can be calculated in a query
e.g. there's no need to have an end date in the table
select dateadd("d",21,loan_start_date) as loan_end_date ...