Wiki

Scale Your Enterprise

User Tools

Site Tools


bw:hana_sql_tips

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
bw:hana_sql_tips [2020/08/10 10:32]
runger Add case sensitive information
bw:hana_sql_tips [2020/08/10 14:34] (current)
Line 21: Line 21:
 The same issue is found when using User Applied Filters in reports.  If the value in the database is "Acme" but the user enters "acme", a match will not be found. The same issue is found when using User Applied Filters in reports.  If the value in the database is "Acme" but the user enters "acme", a match will not be found.
  
-One way to address this is to add a "Search" field that is all lower (or upper) case.  In+One way to address this is to add a "Search" field that is all lower (or upper) case.  The sample below converts the column "CardName" to all lower case. 
 + 
 +<code SQL> 
 +select 
 +t0."CardCode", t0."CardName", t0."CardType", t0."UpdateDate", lower(t0."CardName") as "SearchName" 
 +from "OCRD" t0 
 +</code> 
 + 
 +"SearchName" is used for the User Applied Filter but is not displayed in the report presentation.  The value in the column "CardName" is displayed in the presentation since it has the proper case.  This approach should work anywhere that alpha characters are used in search (or lookup) and you don't want the user to worry about the case.  Keep in mind, however, that this only works if the search column 9where the user enters a value) is all lower or all upper case.
bw/hana_sql_tips.1597069941.txt.gz · Last modified: 2020/08/10 10:32 by runger