Barcode_EAN13_ttf_Report |
|
SELECT |
✔ |
Details |
SELECT "1_1" || CASE WHEN("1_2" = 1) THEN 'B' WHEN("1_2" = 2) THEN 'C' WHEN("1_2" = 3) THEN 'D' WHEN("1_2" = 4) THEN 'E' WHEN("1_2" = 5) THEN 'F' WHEN("1_2" = 6) THEN 'G' WHEN("1_2" = 7) THEN 'H' WHEN("1_2" = 8) THEN 'I' WHEN("1_2" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("1_3" = 1) THEN 'B' WHEN("1_3" = 2) THEN 'C' WHEN("1_3" = 3) THEN 'D' WHEN("1_3" = 4) THEN 'E' WHEN("1_3" = 5) THEN 'F' WHEN("1_3" = 6) THEN 'G' WHEN("1_3" = 7) THEN 'H' WHEN("1_3" = 8) THEN 'I' WHEN("1_3" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("1_4" = 1) THEN 'B' WHEN("1_4" = 2) THEN 'C' WHEN("1_4" = 3) THEN 'D' WHEN("1_4" = 4) THEN 'E' WHEN("1_4" = 5) THEN 'F' WHEN("1_4" = 6) THEN 'G' WHEN("1_4" = 7) THEN 'H' WHEN("1_4" = 8) THEN 'I' WHEN("1_4" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("1_5" = 1) THEN 'B' WHEN("1_5" = 2) THEN 'C' WHEN("1_5" = 3) THEN 'D' WHEN("1_5" = 4) THEN 'E' WHEN("1_5" = 5) THEN 'F' WHEN("1_5" = 6) THEN 'G' WHEN("1_5" = 7) THEN 'H' WHEN("1_5" = 8) THEN 'I' WHEN("1_5" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("1_6" = 1) THEN 'B' WHEN("1_6" = 2) THEN 'C' WHEN("1_6" = 3) THEN 'D' WHEN("1_6" = 4) THEN 'E' WHEN("1_6" = 5) THEN 'F' WHEN("1_6" = 6) THEN 'G' WHEN("1_6" = 7) THEN 'H' WHEN("1_6" = 8) THEN 'I' WHEN("1_6" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("1_7" = 1) THEN 'B' WHEN("1_7" = 2) THEN 'C' WHEN("1_7" = 3) THEN 'D' WHEN("1_7" = 4) THEN 'E' WHEN("1_7" = 5) THEN 'F' WHEN("1_7" = 6) THEN 'G' WHEN("1_7" = 7) THEN 'H' WHEN("1_7" = 8) THEN 'I' WHEN("1_7" = 9) THEN 'J' ELSE 'A' END || '*' || CASE WHEN("1_8" = 1) THEN 'b' WHEN("1_8" = 2) THEN 'c' WHEN("1_8" = 3) THEN 'd' WHEN("1_8" = 4) THEN 'e' WHEN("1_8" = 5) THEN 'f' WHEN("1_8" = 6) THEN 'g' WHEN("1_8" = 7) THEN 'h' WHEN("1_8" = 8) THEN 'i' WHEN("1_8" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("1_9" = 1) THEN 'b' WHEN("1_8" = 2) THEN 'c' WHEN("1_9" = 3) THEN 'd' WHEN("1_9" = 4) THEN 'e' WHEN("1_9" = 5) THEN 'f' WHEN("1_9" = 6) THEN 'g' WHEN("1_9" = 7) THEN 'h' WHEN("1_9" = 8) THEN 'i' WHEN("1_9" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("1_10" = 1) THEN 'b' WHEN("1_10" = 2) THEN 'c' WHEN("1_10" = 3) THEN 'd' WHEN("1_10" = 4) THEN 'e' WHEN("1_10" = 5) THEN 'f' WHEN("1_10" = 6) THEN 'g' WHEN("1_10" = 7) THEN 'h' WHEN("1_10" = 8) THEN 'i' WHEN("1_10" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("1_11" = 1) THEN 'b' WHEN("1_11" = 2) THEN 'c' WHEN("1_11" = 3) THEN 'd' WHEN("1_11" = 4) THEN 'e' WHEN("1_11" = 5) THEN 'f' WHEN("1_11" = 6) THEN 'g' WHEN("1_11" = 7) THEN 'h' WHEN("1_11" = 8) THEN 'i' WHEN("1_11" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("1_12" = 1) THEN 'b' WHEN("1_12" = 2) THEN 'c' WHEN("1_12" = 3) THEN 'd' WHEN("1_12" = 4) THEN 'e' WHEN("1_12" = 5) THEN 'f' WHEN("1_12" = 6) THEN 'g' WHEN("1_12" = 7) THEN 'h' WHEN("1_12" = 8) THEN 'i' WHEN("1_12" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("1_13" = 1) THEN 'b' WHEN("1_13" = 2) THEN 'c' WHEN("1_13" = 3) THEN 'd' WHEN("1_13" = 4) THEN 'e' WHEN("1_13" = 5) THEN 'f' WHEN("1_13" = 6) THEN 'g' WHEN("1_13" = 7) THEN 'h' WHEN("1_13" = 8) THEN 'i' WHEN("1_13" = 9) THEN 'j' ELSE 'a' END || '+' AS "S_1", "2_1" || CASE WHEN("2_2" = 1) THEN 'B' WHEN("2_2" = 2) THEN 'C' WHEN("2_2" = 3) THEN 'D' WHEN("2_2" = 4) THEN 'E' WHEN("2_2" = 5) THEN 'F' WHEN("2_2" = 6) THEN 'G' WHEN("2_2" = 7) THEN 'H' WHEN("2_2" = 8) THEN 'I' WHEN("2_2" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("2_3" = 1) THEN 'B' WHEN("2_3" = 2) THEN 'C' WHEN("2_3" = 3) THEN 'D' WHEN("2_3" = 4) THEN 'E' WHEN("2_3" = 5) THEN 'F' WHEN("2_3" = 6) THEN 'G' WHEN("2_3" = 7) THEN 'H' WHEN("2_3" = 8) THEN 'I' WHEN("2_3" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("2_4" = 1) THEN 'B' WHEN("2_4" = 2) THEN 'C' WHEN("2_4" = 3) THEN 'D' WHEN("2_4" = 4) THEN 'E' WHEN("2_4" = 5) THEN 'F' WHEN("2_4" = 6) THEN 'G' WHEN("2_4" = 7) THEN 'H' WHEN("2_4" = 8) THEN 'I' WHEN("2_4" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("2_5" = 1) THEN 'B' WHEN("2_5" = 2) THEN 'C' WHEN("2_5" = 3) THEN 'D' WHEN("2_5" = 4) THEN 'E' WHEN("2_5" = 5) THEN 'F' WHEN("2_5" = 6) THEN 'G' WHEN("2_5" = 7) THEN 'H' WHEN("2_5" = 8) THEN 'I' WHEN("2_5" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("2_6" = 1) THEN 'B' WHEN("2_6" = 2) THEN 'C' WHEN("2_6" = 3) THEN 'D' WHEN("2_6" = 4) THEN 'E' WHEN("2_6" = 5) THEN 'F' WHEN("2_6" = 6) THEN 'G' WHEN("2_6" = 7) THEN 'H' WHEN("2_6" = 8) THEN 'I' WHEN("2_6" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("2_7" = 1) THEN 'B' WHEN("2_7" = 2) THEN 'C' WHEN("2_7" = 3) THEN 'D' WHEN("2_7" = 4) THEN 'E' WHEN("2_7" = 5) THEN 'F' WHEN("2_7" = 6) THEN 'G' WHEN("2_7" = 7) THEN 'H' WHEN("2_7" = 8) THEN 'I' WHEN("2_7" = 9) THEN 'J' ELSE 'A' END || '*' || CASE WHEN("2_8" = 1) THEN 'b' WHEN("2_8" = 2) THEN 'c' WHEN("2_8" = 3) THEN 'd' WHEN("2_8" = 4) THEN 'e' WHEN("2_8" = 5) THEN 'f' WHEN("2_8" = 6) THEN 'g' WHEN("2_8" = 7) THEN 'h' WHEN("2_8" = 8) THEN 'i' WHEN("2_8" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("2_9" = 1) THEN 'b' WHEN("2_8" = 2) THEN 'c' WHEN("2_9" = 3) THEN 'd' WHEN("2_9" = 4) THEN 'e' WHEN("2_9" = 5) THEN 'f' WHEN("2_9" = 6) THEN 'g' WHEN("2_9" = 7) THEN 'h' WHEN("2_9" = 8) THEN 'i' WHEN("2_9" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("2_10" = 1) THEN 'b' WHEN("2_10" = 2) THEN 'c' WHEN("2_10" = 3) THEN 'd' WHEN("2_10" = 4) THEN 'e' WHEN("2_10" = 5) THEN 'f' WHEN("2_10" = 6) THEN 'g' WHEN("2_10" = 7) THEN 'h' WHEN("2_10" = 8) THEN 'i' WHEN("2_10" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("2_11" = 1) THEN 'b' WHEN("2_11" = 2) THEN 'c' WHEN("2_11" = 3) THEN 'd' WHEN("2_11" = 4) THEN 'e' WHEN("2_11" = 5) THEN 'f' WHEN("2_11" = 6) THEN 'g' WHEN("2_11" = 7) THEN 'h' WHEN("2_11" = 8) THEN 'i' WHEN("2_11" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("2_12" = 1) THEN 'b' WHEN("2_12" = 2) THEN 'c' WHEN("2_12" = 3) THEN 'd' WHEN("2_12" = 4) THEN 'e' WHEN("2_12" = 5) THEN 'f' WHEN("2_12" = 6) THEN 'g' WHEN("2_12" = 7) THEN 'h' WHEN("2_12" = 8) THEN 'i' WHEN("2_12" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("2_13" = 1) THEN 'b' WHEN("2_13" = 2) THEN 'c' WHEN("2_13" = 3) THEN 'd' WHEN("2_13" = 4) THEN 'e' WHEN("2_13" = 5) THEN 'f' WHEN("2_13" = 6) THEN 'g' WHEN("2_13" = 7) THEN 'h' WHEN("2_13" = 8) THEN 'i' WHEN("2_13" = 9) THEN 'j' ELSE 'a' END || '+' AS "S_2", "3_1" || CASE WHEN("3_2" = 1) THEN 'B' WHEN("3_2" = 2) THEN 'C' WHEN("3_2" = 3) THEN 'D' WHEN("3_2" = 4) THEN 'E' WHEN("3_2" = 5) THEN 'F' WHEN("3_2" = 6) THEN 'G' WHEN("3_2" = 7) THEN 'H' WHEN("3_2" = 8) THEN 'I' WHEN("3_2" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("3_3" = 1) THEN 'B' WHEN("3_3" = 2) THEN 'C' WHEN("3_3" = 3) THEN 'D' WHEN("3_3" = 4) THEN 'E' WHEN("3_3" = 5) THEN 'F' WHEN("3_3" = 6) THEN 'G' WHEN("3_3" = 7) THEN 'H' WHEN("3_3" = 8) THEN 'I' WHEN("3_3" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("3_4" = 1) THEN 'B' WHEN("3_4" = 2) THEN 'C' WHEN("3_4" = 3) THEN 'D' WHEN("3_4" = 4) THEN 'E' WHEN("3_4" = 5) THEN 'F' WHEN("3_4" = 6) THEN 'G' WHEN("3_4" = 7) THEN 'H' WHEN("3_4" = 8) THEN 'I' WHEN("3_4" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("3_5" = 1) THEN 'B' WHEN("3_5" = 2) THEN 'C' WHEN("3_5" = 3) THEN 'D' WHEN("3_5" = 4) THEN 'E' WHEN("3_5" = 5) THEN 'F' WHEN("3_5" = 6) THEN 'G' WHEN("3_5" = 7) THEN 'H' WHEN("3_5" = 8) THEN 'I' WHEN("3_5" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("3_6" = 1) THEN 'B' WHEN("3_6" = 2) THEN 'C' WHEN("3_6" = 3) THEN 'D' WHEN("3_6" = 4) THEN 'E' WHEN("3_6" = 5) THEN 'F' WHEN("3_6" = 6) THEN 'G' WHEN("3_6" = 7) THEN 'H' WHEN("3_6" = 8) THEN 'I' WHEN("3_6" = 9) THEN 'J' ELSE 'A' END || CASE WHEN("3_7" = 1) THEN 'B' WHEN("3_7" = 2) THEN 'C' WHEN("3_7" = 3) THEN 'D' WHEN("3_7" = 4) THEN 'E' WHEN("3_7" = 5) THEN 'F' WHEN("3_7" = 6) THEN 'G' WHEN("3_7" = 7) THEN 'H' WHEN("3_7" = 8) THEN 'I' WHEN("3_7" = 9) THEN 'J' ELSE 'A' END || '*' || CASE WHEN("3_8" = 1) THEN 'b' WHEN("3_8" = 2) THEN 'c' WHEN("3_8" = 3) THEN 'd' WHEN("3_8" = 4) THEN 'e' WHEN("3_8" = 5) THEN 'f' WHEN("3_8" = 6) THEN 'g' WHEN("3_8" = 7) THEN 'h' WHEN("3_8" = 8) THEN 'i' WHEN("3_8" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("3_9" = 1) THEN 'b' WHEN("3_8" = 2) THEN 'c' WHEN("3_9" = 3) THEN 'd' WHEN("3_9" = 4) THEN 'e' WHEN("3_9" = 5) THEN 'f' WHEN("3_9" = 6) THEN 'g' WHEN("3_9" = 7) THEN 'h' WHEN("3_9" = 8) THEN 'i' WHEN("3_9" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("3_10" = 1) THEN 'b' WHEN("3_10" = 2) THEN 'c' WHEN("3_10" = 3) THEN 'd' WHEN("3_10" = 4) THEN 'e' WHEN("3_10" = 5) THEN 'f' WHEN("3_10" = 6) THEN 'g' WHEN("3_10" = 7) THEN 'h' WHEN("3_10" = 8) THEN 'i' WHEN("3_10" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("3_11" = 1) THEN 'b' WHEN("3_11" = 2) THEN 'c' WHEN("3_11" = 3) THEN 'd' WHEN("3_11" = 4) THEN 'e' WHEN("3_11" = 5) THEN 'f' WHEN("3_11" = 6) THEN 'g' WHEN("3_11" = 7) THEN 'h' WHEN("3_11" = 8) THEN 'i' WHEN("3_11" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("3_12" = 1) THEN 'b' WHEN("3_12" = 2) THEN 'c' WHEN("3_12" = 3) THEN 'd' WHEN("3_12" = 4) THEN 'e' WHEN("3_12" = 5) THEN 'f' WHEN("3_12" = 6) THEN 'g' WHEN("3_12" = 7) THEN 'h' WHEN("3_12" = 8) THEN 'i' WHEN("3_12" = 9) THEN 'j' ELSE 'a' END || CASE WHEN("3_13" = 1) THEN 'b' WHEN("3_13" = 2) THEN 'c' WHEN("3_13" = 3) THEN 'd' WHEN("3_13" = 4) THEN 'e' WHEN("3_13" = 5) THEN 'f' WHEN("3_13" = 6) THEN 'g' WHEN("3_13" = 7) THEN 'h' WHEN("3_13" = 8) THEN 'i' WHEN("3_13" = 9) THEN 'j' ELSE 'a' END || '+' AS "S_3" FROM "View_EAN13_Substring" |
Current_Date |
Current_Date (Query) Loan|Choose_Reader|Return|Tablecontrol|Return_Date (Control) |
SELECT |
|
Details |
SELECT CURDATE() AS "Current_Date", CURDATE() FROM "Preferences" |
ISBN_Test |
Media_Input_Search_Result (Query) |
SELECT |
|
Details |
SELECT "a"."ID", "a"."ISBN", CASE WHEN ( ( IFNULL( ( SELECT "ISBN13_Test" FROM ( SELECT "ID", MOD( ( ( TRUNCATE("ISBN", - 12) / 1000000000000 - TRUNCATE("ISBN", - 13) / 1000000000000) + 3 * ( TRUNCATE("ISBN", - 11) / 100000000000 - TRUNCATE("ISBN", - 12) / 100000000000) + ( TRUNCATE("ISBN", - 10) / 10000000000 - TRUNCATE("ISBN", - 11) / 10000000000) + 3 * ( TRUNCATE("ISBN", - 9) / 1000000000 - TRUNCATE("ISBN", - 10) / 1000000000) + ( TRUNCATE("ISBN", - 8) / 100000000 - TRUNCATE("ISBN", - 9) / 100000000) + 3 * ( TRUNCATE("ISBN", - 7) / 10000000 - TRUNCATE("ISBN", - 8) / 10000000) + ( TRUNCATE("ISBN", - 6) / 1000000 - TRUNCATE("ISBN", - 7) / 1000000) + 3 * ( TRUNCATE("ISBN", - 5) / 100000 - TRUNCATE("ISBN", - 6) / 100000) + ( TRUNCATE("ISBN", - 4) / 10000 - TRUNCATE("ISBN", - 5) / 10000) + 3 * ( TRUNCATE("ISBN", - 3) / 1000 - TRUNCATE("ISBN", - 4) / 1000) + ( TRUNCATE("ISBN", - 2) / 100 - TRUNCATE("ISBN", - 3) / 100) + 3 * ( TRUNCATE("ISBN", - 1) / 10 - TRUNCATE("ISBN", - 2) / 10) + ( "ISBN" - TRUNCATE("ISBN", - 1))), 10) AS "ISBN13_Test" FROM "Media") AS "I_Test" WHERE "ID" = "a"."ID" AND "a"."ISBN" > 9999999999), 0) + IFNULL( ( SELECT "ISBN10_Test" FROM ( SELECT "ID", MOD( CEILING( ( TRUNCATE("ISBN", - 9) / 1000000000 - TRUNCATE("ISBN", - 10) / 1000000000) + 2 * ( TRUNCATE("ISBN", - 8) / 100000000 - TRUNCATE("ISBN", - 9) / 100000000) + 3 * ( TRUNCATE("ISBN", - 7) / 10000000 - TRUNCATE("ISBN", - 8) / 10000000) + 4 * ( TRUNCATE("ISBN", - 6) / 1000000 - TRUNCATE("ISBN", - 7) / 1000000) + 5 * ( TRUNCATE("ISBN", - 5) / 100000 - TRUNCATE("ISBN", - 6) / 100000) + 6 * ( TRUNCATE("ISBN", - 4) / 10000 - TRUNCATE("ISBN", - 5) / 10000) + 7 * ( TRUNCATE("ISBN", - 3) / 1000 - TRUNCATE("ISBN", - 4) / 1000) + 8 * ( TRUNCATE("ISBN", - 2) / 100 - TRUNCATE("ISBN", - 3) / 100) + 9 * ( TRUNCATE("ISBN", - 1) / 10 - TRUNCATE("ISBN", - 2) / 10) + 10 * ( "ISBN" - TRUNCATE("ISBN", - 1))), 11) AS "ISBN10_Test" FROM "Media") AS "I_Test" WHERE "ID" = "a"."ID" AND "a"."ISBN" < 10000000000), 0)) > 0) THEN 'ISBN-Number wrong' WHEN ( IFNULL( ( SELECT "ISBN" FROM "Media" WHERE "ID" = "a"."ID"), - 1) = - 1) THEN '' ELSE 'ISBN-Number OK' END AS "Test" FROM "Media" AS "a" |
Listbox_Title_MediaID_not_loan |
Loan|Choose_Reader|Show_Reader|Loan|Input|Listfield 1 (Control) |
SELECT |
|
Details |
SELECT "View_MediaID_Title_Author"."ID_Title_Author", "View_MediaID_Title_Author"."ID" FROM "Media", "View_MediaID_Title_Author" WHERE "Media"."ID" = "View_MediaID_Title_Author"."ID" AND "Media"."ID" NOT IN ( SELECT IFNULL( "Media_ID", TRUNCATE("Media_ID_BC", - 1) / 10) FROM "Loan" WHERE "Return_Date" IS NULL) |
Loan_not_locked |
Reader_Input_Filter (Query) Loan|Choose_Reader|Show_Reader|Loan (Control) Loan_Barcode|Form|Loan (Control) |
SELECT |
|
Details |
SELECT "ID", "FirstName", "LastName", "LastName" || ', ' || "FirstName" AS "Name", "Lock", CURDATE() AS "cur_Date" FROM "Reader" WHERE "Lock" = 0 AND "ID" NOT IN ( SELECT "Reader_ID" FROM "Loan" WHERE "Return_Date" IS NULL AND ( SELECT "Mediastyle"."Loantime" FROM "Mediastyle", "Media" WHERE "Media"."Mediastyle_ID" = "Mediastyle"."ID" AND ( "Media_ID" = "Media"."ID" OR "Media"."ID" = TRUNCATE("Media_ID_BC", - 1) / 10)) + IFNULL("Extension", 0) * ( SELECT "ExtensionDays" FROM "Preferences") - DATEDIFF( 'dd', "Loan_Date", CURDATE()) < 0) |
Media_Chart |
|
SELECT |
✔ |
Details |
SELECT "Media_ID", COUNT("ID") AS "Count", ( SELECT "ID_Title_Author" FROM "View_MediaID_Title_Author" WHERE "ID" = "Chart_Start"."Media_ID") AS "Medium" FROM ( SELECT IFNULL( "Media_ID", CEILING("Media_ID_BC" / 10)) AS "Media_ID", "ID" FROM "Loan") AS "Chart_Start" GROUP BY "Media_ID" ORDER BY COUNT("ID") DESC LIMIT 10 |
Media_Input_Search_Result |
Media (Form) |
SELECT |
|
Details |
SELECT "ID", "Title", "Edition", "Pub_Year", "Comment", "Category_ID", "Mediastyle_ID", "Town_ID", "Publisher_ID", "Price", "Picture", "ISBN", ( SELECT "Test" FROM "ISBN_Test" WHERE "ID" = "a"."ID") AS "ISBN_Test" FROM "Media" AS "a" WHERE "ID" IN ( SELECT "ID" FROM "View_Media_Search_Result") |
Media_Loan_Balance_Time |
Loan|Choose_Reader|Return (Control) Loan|Choose_Reader|Show_Reader|Loan|Show (Control) Loan_Barcode|Form|Return (Control) |
SELECT |
|
Details |
SELECT "ID", IFNULL( "Media_ID", TRUNCATE("Media_ID_BC", - 1) / 10) AS "Media_ID", ( SELECT "ID_Title_Author" FROM "View_MediaID_Title_Author" WHERE "ID" = "a"."Media_ID" OR "ID" = TRUNCATE("a"."Media_ID_BC", - 1) / 10) AS "Medium", "Reader_ID", "Loan_Date", "Return_Date", "Extension", IFNULL("Extension", 0) * ( SELECT "ExtensionDays" FROM "Preferences") AS "prolonged_for", DATEDIFF( 'dd', "Loan_Date", CURDATE()) AS "LoanDays", ( SELECT "Mediastyle"."Loantime" FROM "Mediastyle", "Media" WHERE "Media"."Mediastyle_ID" = "Mediastyle"."ID" AND ( "a"."Media_ID" = "Media"."ID" OR "Media"."ID" = TRUNCATE("a"."Media_ID_BC", - 1) / 10)) + IFNULL("Extension", 0) * ( SELECT "ExtensionDays" FROM "Preferences") - DATEDIFF( 'dd', "Loan_Date", CURDATE()) AS "BalanceTime" FROM "Loan" "a" WHERE "Return_Date" IS NULL ORDER BY "BalanceTime" ASC |
Media_Loan_Balance_Time_Recall |
Recall|Form (Control) |
SELECT |
|
Details |
SELECT "View_MediaID_Title_Author"."ID_Title_Author", IFNULL( "Media_ID", TRUNCATE("Media_ID_BC", - 1) / 10) AS "Media_ID", "a"."ID", "Reader_ID", "Loan_Date", "Return_Date", "Extension", IFNULL("Extension", 0) * ( SELECT "ExtensionDays" FROM "Preferences") AS "prolonged_for", DATEDIFF( 'dd', "Loan_Date", CURDATE()) AS "LoanDays", ( SELECT "Mediastyle"."Loantime" FROM "Mediastyle", "Media" WHERE "Media"."Mediastyle_ID" = "Mediastyle"."ID" AND ( "a"."Media_ID" = "Media"."ID" OR "Media"."ID" = TRUNCATE("a"."Media_ID_BC", - 1) / 10)) + IFNULL("Extension", 0) * ( SELECT "ExtensionDays" FROM "Preferences") - DATEDIFF( 'dd', "Loan_Date", CURDATE()) AS "BalanceTime" FROM "View_MediaID_Title_Author", "Loan" AS "a" WHERE "View_MediaID_Title_Author"."ID" = "Media_ID" AND "Return_Date" IS NULL AND ( SELECT "Mediastyle"."Loantime" FROM "Mediastyle", "Media" WHERE "Media"."Mediastyle_ID" = "Mediastyle"."ID" AND ( "Media_ID" = "Media"."ID" OR "Media"."ID" = TRUNCATE("Media_ID_BC", - 1) / 10)) + IFNULL("Extension", 0) * ( SELECT "ExtensionDays" FROM "Preferences") - DATEDIFF( 'dd', "Loan_Date", CURDATE()) < 0 ORDER BY "BalanceTime" ASC |
Media_Recall_Reader |
Recall (Form) |
SELECT |
|
Details |
SELECT DISTINCT "Reader"."ID", "Reader"."LastName", "Reader"."FirstName", "Reader"."LastName" || ', ' || "Reader"."FirstName" AS "Name" FROM "Loan" AS "a", "Reader" WHERE "a"."Return_Date" IS NULL AND "Reader"."ID" = "a"."Reader_ID" AND ( SELECT "Mediastyle"."Loantime" FROM "Mediastyle", "Media" WHERE "Media"."Mediastyle_ID" = "Mediastyle"."ID" AND ( "a"."Media_ID" = "Media"."ID" OR "Media"."ID" = TRUNCATE("a"."Media_ID_BC", - 1) / 10)) + IFNULL("a"."Extension", 0) * ( SELECT "ExtensionDays" FROM "Preferences" WHERE "ID" = True) - DATEDIFF( 'dd', "a"."Loan_Date", CURDATE()) < ( SELECT "MinRecallDays" FROM "Preferences" WHERE "ID" = True) ORDER BY "Reader"."LastName" ASC, "Reader"."FirstName" ASC |
Reader_Input_Filter |
Loan|Choose_Reader (Control) Loan|Choose_Reader|Show_Reader (Control) Loan_Barcode|Form (Control) Reader_Admission|Form (Control) |
SELECT |
|
Details |
SELECT "ID", "LastName" || ', ' || "FirstName" || CASEWHEN( ( SELECT "ID" FROM "Loan_not_locked" WHERE "ID" = "a"."ID") = "a"."ID", '', ' - Loan temporary locked!') AS "Name", "LastName", "FirstName", "Lock", "Gender_ID", 'Current record of ' || "LastName" || ', ' || "FirstName" AS "Formheader" FROM "Reader" AS "a" WHERE UCASE("LastName") LIKE IFNULL( ( SELECT UCASE("Filter") FROM "Filter"), UCASE("LastName")) || '%' |
Recall_Recallnumber |
Recall|Form|Form (Control) |
SELECT |
|
Details |
SELECT "a"."ID", "a"."Loan_ID", "a"."Date", ( SELECT COUNT("Loan_ID") FROM "Recall" WHERE "Loan_ID" = "a"."Loan_ID" AND "Date" <= "a"."Date") AS "Recallnumber" FROM "Recall" AS "a" ORDER BY "Loan_ID", "Date" ASC |