Upper / Lower case using SQL
i have to read a field out of a dbtable. The field contains e.g. a string like "a11B". During the sql selection i would like to use upper or lower case to transform the string to "A11B":
SELECT...WHERE UPPER(attribute) IN range_variable.
Can somebody say how this command looks like in abap?
I haven't found a command for abap like UPPER() or UCASE() using mysql.
Depending on you database system, you can use native SQL. For Oracle:
report ztest no standard page heading. tables lfa1. data: name like lfa1-name1 value 'TEST'. EXEC SQL. SELECT * INTO :LFA1 FROM LFA1 WHERE UPPER(NAME1) = :NAME ENDEXEC.
This will select where the name is "Test" or "TEST" or other combinations.