Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Case-insensitive comparison in SELECT condition

Tags:

abap

opensql

In ABAP SQL can I ignore the case when comparing fields in the WHERE clause of a SELECT?

SELECT * 
FROM some_table 
WHERE field1 = variable1.

How can I compare field1 to variable1 ignoring different case?

like image 789
Dustin Sun Avatar asked Jun 22 '11 16:06

Dustin Sun


1 Answers

Open SQL can do this with the function UPPER starting ABAP 7.51.

Example:

SELECT * 
FROM some_table 
WHERE UPPER( field1 ) = @variable1
INTO TABLE @DATA(internal_table).
like image 59
Psio Avatar answered Sep 20 '22 02:09

Psio