Application Development and Automation 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: 
Read only

Where clause

Former Member
0 Likes
765

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
Read only

Former Member
0 Likes
736

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

Read only

Former Member
0 Likes
736

Hi sai,

1. U can give OR Condition in brackets.

2. eg.

Where

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

regards,

amit m.

Read only

hymavathi_oruganti
Active Contributor
0 Likes
736

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').

Read only

Former Member
0 Likes
736

hii

Select * from <databse table>

into itab

where database-field = 'SNAIL MAIL' and

database-field = 'Snail MAil'

Read only

Former Member
0 Likes
736

Hi,

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

Regards

vijay

Read only

0 Likes
736

hi

Select * from <databse table>

into table itab

where database-field = 'SNAIL MAIL' or

database-field = 'Snail MAil'

Read only

Former Member
0 Likes
736

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