-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Case-insensitive searching #33
Comments
Original comment by Jesse G (Bitbucket: ThePrez, GitHub: ThePrez). @krisbaehr , my best guess is to call What is your use case? Are you just doing some |
Original comment by Kristopher Baehr (Bitbucket: krisbaehr, GitHub: krisbaehr). @ThePrez When I run an SQL statement, I'd like to be able to specify case-sensitivity. For example, when providing a method for searching for companies by name, I'd like to be able to indicate whether the SQL query should be case-insensitive ('abc' = 'ABC'). Setting the SRTSEQ is the way RPGLE indicates to DB2 to do it, and that may happen at compile time. SRTSEQ = *LANGIDSHR indicates that a shared-weight sort table is used for the language id. When using shared-weight, the end result is that 'abc' and 'ABC' are equivalent on an SQL statement's where clause. Like I mentioned in the first post, we can perform case-insensitive searches like this manually, but it would be handy if we could set an option instead: If this is an option, it would be nice if it wasn't specified at the connection level since the connections get re-used in a pool. Let me know if you need further clarification, I appreciate all you guys do. |
Consulted some Db2 experts. This feature is not supported. It depends on the user to handle the case-insensitive searching like
|
Original report by Kristopher Baehr (Bitbucket: krisbaehr, GitHub: krisbaehr).
Is there an equivalent to "exec sql SET OPTION SRTSEQ=*LANGIDSHR" as in an RPGLE program? This tells the program to perform case-insensitive searches when executing SQL. Could we run this before running a statement, or by setting a statement option? If this was a setting on a statement, not a connection that would be great. We can always use the upper() and lower() sql functions if necessary. Any help is appreciated.
The text was updated successfully, but these errors were encountered: