Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Upper / Lower case using SQL

Hello friends,

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.

<<help>>

daniel

Tags:
Former Member
Former Member replied

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.

Rob

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question