Home > database >  Pray god to guide! Access how SQL query in the business situation of this table
Pray god to guide! Access how SQL query in the business situation of this table

Time:09-29

The following lenders to ignore,
Assume that data table there are five days a year, the results of the query date 2-4

Hope the query result is

Prose, this is business situation table chronology, content of course, course name, borrowing at the beginning, occurs, the final amount, all records in the table for borrowing at the beginning, at least, in the final six is not 0, within a certain date range query purpose for a query table amount and the balance of all my subjects, such as range does not exist a certain subjects and exists in the entire table, take the subject distance left outside the range closest to the date of the borrowers ending balance, such as the subjects in the left outside the interval does not exist, take a right outside the range closest to the date of initial balance of lenders,
Hope to use the SQL, can through the select into temp drop table after temp method to improve efficiency, for a great god guidance!

CodePudding user response:

What you said is between,,, and, and, the function of the ah

CodePudding user response:

reference 1st floor qq_37170555 response:
what you said is between,,, and, and, the function of

Between appear in the where and having the most problem is the search subject is dynamic, according to the result of subject search at the beginning the final balance of lenders is dynamic, and although limited date range, however, at the beginning the final lenders amount still not within the scope of the fixed, similar to the iif but iif completely inadequate, only sum debit amount and the sum amount lenders can simple the between and

CodePudding user response:

No one

CodePudding user response:

  • Related