Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Where clause

Former Member
0 Kudos

Hi all

i need to fetch all those records for output_type

having the value "SNAIL MAIL" and ' Snail MAil'

how can i specfy this in the where clause

Thanks

SAI

7 REPLIES 7

Former Member
0 Kudos

hi Sai,

data : var1(10) type c value 'SNAIL MAIL',

var2(10) type c value ' Snail MAil'.

select .... where ( field = var1 or field = var2 ).

Regards,

Santosh

Former Member
0 Kudos

Hi sai,

1. U can give OR Condition in brackets.

2. eg.

Where

( field = 'SNAIL MAIL' OR FIELD = 'Snail MAil' )

regards,

amit m.

hymavathi_oruganti
Active Contributor
0 Kudos

select * from <dbtab> into <itab>

where output_type = 'SNAIL MAIL' OR

output_type = Snail MAil'.

(or)

select * from <dbtab> into <itab>

where output_type IN ('SNAIL MAIL', Snail MAil').

Former Member
0 Kudos

hii

Select * from <databse table>

into itab

where database-field = 'SNAIL MAIL' and

database-field = 'Snail MAil'

former_member188685
Active Contributor
0 Kudos

Hi,

where
  ( field = 'SNAIL MAIL' 
OR FIELD = 'Snail MAil' ).

Regards

vijay

0 Kudos

hi

Select * from <databse table>

into table itab

where database-field = 'SNAIL MAIL' or

database-field = 'Snail MAil'

Former Member
0 Kudos

Hi,

If u want to select data without taking care of the case.

then u can do this.

DATA letters(10) TYPE C.

MOVE 'snail mail' TO letters.

TRANSLATE letters TO UPPER CASE.

then use in where clause.

select * from ...

into table itab

where field = letters.

or if this is not the case then u can use any of the above statements.

Reagrds