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: 

regarding SQL query

Former Member
0 Kudos

hi all,

I have got one query very i need to check for an field condition based,that is for field1 eq ='ABC' and field1 eq 'dcf' with other conditions as well.

So please tell me how to do it in only one sql statement.

code is as follows:

SELECT RBUKRS RACCT RZZSLOB RZZBSA RBLART RMVCT FROM ZDLC2T INTO TABLE it_fndtab

WHERE RYEAR EQ p_year AND RBUKRS IN s_comp and ( RBLART EQ 'ZS' and RBLART EQ 'ZQ' ).

Thanks in Advance.

Reward points given

2 REPLIES 2

Former Member
0 Kudos

Hi,

Check out this code.

SELECT RBUKRS RACCT RZZSLOB RZZBSA RBLART RMVCT FROM ZDLC2T INTO TABLE it_fndtab

WHERE RYEAR EQ p_year AND RBUKRS IN s_comp and RBLART in ( 'ZS' , 'ZQ' ).

regards,

Santosh Thorat

Former Member
0 Kudos

Hi Aruna,

Please use the or statement.

RBLART EQ 'ZS'

or

RBLART EQ 'ZQ'

Hope this helps.

Benedict