Handy Library Manager
 for Windows


Help, how to topics > Library Main Catalogue > How to display last month loans (SQL search sample)?


How to display last month loans (SQL search sample)?

In the Advanced Search, you can define the search criteria using a ready-to-use interface. Advanced users can directly enter search conditions in the search box, allowing for the use of SQL functions.

  • Copy and paste the below search definition into the Search Conditions (1) box:

    EXTRACT(MONTH FROM LOANDATE)=EXTRACT(MONTH FROM CURRENT_DATE)-1

  • The EXTRACT function is used to return MONTH (number from 1 to 12) from the LOANDATE.
    The EXTRACT function is used to return MONTH (number from 1 to 12)from the CURRENT_DATE function. It will be the current month value.
    The CURRENT_DATE function returns the current date.
  • The month from the loan date will be compared with the last month (current month - 1). Only loan transactions from the last month will be displayed.
  • Click Save (2) to save the search (query definition) for future use. Our library software allows you to save the most often used searches for future use.

  • Enter search name (Last Month Transactions) (1) into the Filter Name box.
  • Click Save (2).

  • Click View to display all predefined searches. The new search definition (query) is listed in the View box. Select Last Month Loans (1)
  • Select Is Equal To (2) in the Condition box.
  • Select any date (3) in the Value box.
  • Click Include (4).
  • Search condition is displayed in the Search Conditions box (5).



How to directly enter search conditions into the search box. How to utilize SQL functions in the search definition (EXTRACT, MONTH, CURRENT_DATE). How to reuse search definitions from the library.

Copyright © 2024 · All Rights Reserved · PrimaSoft PC