Skip to Content
0
Former Member
Jul 31, 2007 at 09:12 AM

ignore case in SELECT statement

1813 Views

Hello, is there some possibility, to ignore case while comparing text values in WHERE clausule? In one table, field can be in lower case in second in can be in upper case. Example: ztablefield = 'ABC_123'; zothertablefield = 'abc_123';

I have to use this field in WHERE clausule:

SELECT a501kschl a501knumh a501~werks

INTO (kschl, knumh, a501_werks)

FROM a501

WHERE a501~userf1_txt = userf1_txt "ignore case

AND a501~datab <= datum

AND a501~datbi => datum

AND a501~werks = werks.

ENDSELECT.

I had an idea, to translate userf1_txt to upper case, and then do the same with a501userf1_txt, but it is not possible in this situation. (I should translate to upper case the a501userf1_txt before the WHERE clausule [??])

Any ideas? Tips?