Case Sensitivity and Koha SQL Statements
Hello, all! In my previous experience with SQL, case did not matter, but here it does? I've been tearing out my hair -- and I'm bald -- for the last several hours over a reported syntax error in a SQL statement I have been composing. It turns out that it wasn't a syntax error, per se -- and I studied for a doctorate in theoretical syntax -- rather a case sensitivity error. The portion of the statement at hand is ... WHERE items.itype = <<Item type|ITEMTYPES>> It turns out "ITEMTYPES" ought to be written "itemtypes". Only through trial and error did I learn that some identifiers are case sensitive. I sought in the Koha wiki confirmation, refutation, and qualification that CASE INDEED MATTERS IN IDENTIFIERS, but I could not find anything about that. If case does indeed matter, please update the online and print SQL manual(s) accordingly. I would not have spent two hours on this if the correct word had been used in the error message. So please adjust the wording, too. Many thanks. -- 気を付けて。 /ki wo tukete/ = Take care. -- Charles. Charles Kelley, MLS PSC 704 Box 1029 APO AP 96338 Charles Kelley Tsukimino 1-Chome 5-2 Tsukimino Gaadenia #210 Yamato-shi, Kanagawa-ken 〒242-0002 JAPAN +1-301-741-7122 [US cell] +81-80-4356-2178 [JPN cell] mnogojazyk@aol.com [h] cmkelleymls@gmail.com [p] linkedin.com/in/cmkelleymls <http://www.linkedin.com/in/cmkelleymls> Meeting Your Information Needs. Virtually.
Hi Charles, the runtime parameters are not part of SQL, but are Koha specific. They are replaced with proper SQL before being run. If you can point us to where the documentation or Koha behavior is wrong, we can fix that. Best would be to file bugs on https://bugs.koha-community.org/ separately for the manual and Koha itself. Hope this helps, Katrin On 01.10.21 06:35, Charles Kelley wrote:
Hello, all!
In my previous experience with SQL, case did not matter, but here it does?
I've been tearing out my hair -- and I'm bald -- for the last several hours over a reported syntax error in a SQL statement I have been composing. It turns out that it wasn't a syntax error, per se -- and I studied for a doctorate in theoretical syntax -- rather a case sensitivity error.
The portion of the statement at hand is
... WHERE items.itype = <<Item type|ITEMTYPES>>
It turns out "ITEMTYPES" ought to be written "itemtypes". Only through trial and error did I learn that some identifiers are case sensitive. I sought in the Koha wiki confirmation, refutation, and qualification that CASE INDEED MATTERS IN IDENTIFIERS, but I could not find anything about that.
If case does indeed matter, please update the online and print SQL manual(s) accordingly. I would not have spent two hours on this if the correct word had been used in the error message. So please adjust the wording, too.
Many thanks.
participants (2)
-
Charles Kelley -
Katrin Fischer