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

select with STAR value

former_member194669
Active Contributor
0 Likes
5,096

Hi All,

I have custom table with field that contains the * (star) values . ie


ABC*123
AB*1234
A*12345
A%12345
a&12345

I need to get values of all * entries using a select statement.

I don't need to select all and loop thru and filter it out

Any suggestions ?

Thanks

aRs

5 REPLIES 5
Read only

suresh_datti
Active Contributor
0 Likes
2,070

you can try using the pattern search ie

select * from <dbtab> into table <itab>

where <fld> like '%*%'.

~Suresh

Read only

Former Member
0 Likes
2,070

Here you go,

for example,

SELECT... WHERE CITY LIKE '%town%'.

This condition is true if the column CITY contains a string containing the pattern ‘town’.

Regards,

Bhasha

Read only

Former Member
0 Likes
2,070

Hello aRs,

U can select like this.


data: var.
var = '*'.

select * from ztable where field like var.

Regards,

Vasanth

Read only

Former Member
0 Likes
2,070

Try this but not sure...

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

Thanks,

SKJ

Read only

Former Member
2,070

Hi,

You can build a wildcard ranges and please try something like this.


r_wildcard-sign =  'I'.
r_wildcard-option = 'CP'.
r_wildcard-low = 'B*'.
append r_wildcard.

r_wildcard-sign =  'I'.
r_wildcard-option = 'CP'.
r_wildcard-low = '*B*'.
append r_wildcard.
 
select * from mara
into table gt_mara_b
where mtart = 'YSAB'
and matnr in r_wildcard.

Regards,

Ferry Lianto