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: 

How to rerieve records from the table starting with character 'D'

Former Member
0 Kudos

Hi Folks,

How to get the records from the table starting with character 'D'.

Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.

last record in the table starting with character 'D'

How can i do that??

Pl explain.

Thanks,

Matt

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.

Select MAX (fld1)
   From  tab1
 into table itab
 where fld 2 = l_fld2 
   and fld1 like 'D%'.

5 REPLIES 5

former_member194669
Active Contributor
0 Kudos

This question asked several times in this forum

please make a search in this form

https://forums.sdn.sap.com/search.jspa?threadID=&q=selectANDlike&objID=f50&dateRange=all&numResults=15

Former Member
0 Kudos

Hi,

Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.

Select MAX (fld1)
   From  tab1
 into table itab
 where fld 2 = l_fld2 
   and fld1 like 'D%'.

Former Member
0 Kudos

Hi Mat,

Select Max (fld1)

from tab1

into tab1-fld1

where fld 2 = l_fld2

and fld(1) LIKE 'D%'.

Thats the solution in BOLD.

Regards,

Vimal.

Former Member
0 Kudos

Please search in SCN before posting

Former Member
0 Kudos

Hello

On your where stm write


SELECT....
where fid like 'D%'.

bye

Gabriel P.-