Handy Library Manager
 for Windows


.. > Library backup, restore, maintenance. > How to Organize, Execute SQL statements?


Organize, Execute SQL Statement (new in version 4.0)

You can prepare and execute a SQL statement. Handy Library Manager is using Firebird SQL database system.

  • Be careful when running SQL statements. You can easily modify or delete all records in your library databases by mistake.
  • Do not use any commands that change the structure of the database (add new or delete existing fields, rename field names, create new or delete existing tables).
  • Before you run any SQL statement, create a backup file.

The Run SQL Statement function supports the following:

  • prepare SQL statement and execute it
  • define SQL statement and save it for future use
  • select the SQL statement from the list and execute it

run sql command, how to access

Run SQL Statement, examples:
grade, update student grades
author, change format
call, use 3 letters from the last name


synchronize loans in library database

UPDATE LIBRARY SET TYPE = REPLACE(TYPE,'Books','Book');
UPDATE LIBRARY SET TYPE = REPLACE(TYPE,'Paper Book','Book');
UPDATE LIBRARY SET TYPE = REPLACE(TYPE,'cds','CD');
UPDATE LIBRARY SET TYPE = REPLACE(TYPE,'dvds','DVD');

Rules:

  • You can execute one or more SQL statements
  • Llist one SQL statement per line
  • At the end of the line, include the Semicolon symbol ";"
  • Before you run any SQL statement, create a backup file

Example:
In this sample, four sql statements are executed. They will change error entries in the TYPE data field:

  • 1st SQL statement will replace "Books" with "Book"
  • 2nd SQL statement will replace "Paper Book" with "Book"
  • 3rd SQL statement will replace "cds" with "CD"
  • 4th SQL statement will replace "dvds" with "DVD"



Question: I use the Grade field so that I can print out their barcodes by grade level. Then I can scan the barcode when each grade level comes to library. This is the first time I've had to change their grade level since using the program. I just couldn't remember what I did in previous years to advance them to the next grade. I will do it manually.

Answer: You can send your library backup file to us. We will review in what data field you store a student's grade level. Then, we will reply with the SQL statement. You can also check how to update student grades.


Copyright © 2024 · All Rights Reserved · PrimaSoft PC