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

view selection condition

Former Member
0 Likes
635

hi,

i find out that no 'IN' operator in selection condition. what should i do.

SELECT caaa cbbb cccc cddd

FROM tab1 AS a INNER JOIN tab2 AS b ON axxx = bxxx

INNER JOIN tab3 AS c ON byyy = cyyy

INTO CORRESPONDING FIELDS OF TABLE itab

WHERE a~xxx = i_xxx AND

a~zzz IN ('04' , '08') AND

b~type = '1'.

1) for IN, how should i define in selection condition in maintain view

2) after i create the view, for the above selection statement, i can simplify to below, correct?

select * from zview where a~xxx = i_xxx.

thanks

4 REPLIES 4
Read only

Former Member
0 Likes
527

Not getting what u r asking,

U can use in operator liek what u specified directly in the code also.

SELECT c~aaa c~bbb c~ccc c~ddd
FROM tab1 AS a INNER JOIN tab2 AS b ON a~xxx = b~xxx
INNER JOIN tab3 AS c ON b~yyy = c~yyy
INTO CORRESPONDING FIELDS OF TABLE itab
WHERE a~xxx = i_xxx AND
a~zzz IN ( '04' , '08' ) AND
b~type = '1'.

Read only

Former Member
0 Likes
527

Hi El,

I used the IN statement in my program and its working perfectly fine.

Why don't you check your program??

Ravi

Read only

Former Member
0 Likes
527

Hi,

Try taking out the single quotes.

a~zzz IN (04 , 08)

Regards,

Prasanth

*Reward if it helps

Read only

Former Member
0 Likes
527

hi,

nothing wrong with that sql statement. the sql statement is working fine.

what i want to know here is if i want to create a view base on the sql statement, I cannot find the 'IN' operator in the selection conditions tab in maintain view.

also i have another question is that,

another shorter sql statement is base on view. i would like to know if the shorter sql statement correct if i use view. i think that is the beauty of view to make the processing faster.

thanks