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: 

I need a logic

Former Member
0 Kudos

Hi,

Could anyone plz give me a logic for the following:

If i have some mail ids ending with .infy.com ,.tcs.com and some other ids in my database.And i just want to retrive only the mail ids ending with *.infy.com from the database so what is the logic we write......

4 REPLIES 4

Former Member
0 Kudos

data : vid(15) value '%.infy.com'.

select * from ztab into table itab where id like vid.

regards

shiba dutta

Former Member
0 Kudos

hi,

code this way ...

if itab-email cp '.infy.com' or 
  itab-email cp '.tcs.com'.

endif. 

if you want to retrieve it from table then code in this way


select * from ztable into ztable where email = '%.infy.com'
                                    or email = '%.tcs.com'.

Former Member
0 Kudos

Hi Chandipriya,

As per the santosh solution it will give you solution. That is the way to retrieve all the mail ids related to infy and tcs.

Hope this helps you. Reply for queries, shall post the updates.

Regards.

Kumar.

former_member194669
Active Contributor
0 Kudos

Hi,


select * from <table> where field like '%infy%' 
                                         or field like '%tcs%.

aRs