04-17-2009 4:16 PM
Hello,
I have for all entries for 5 tables but I need to extract all the data where it begins with certain leters like "ab". how can I define that in my select. Thanks
04-17-2009 4:18 PM
You can use wild card characters like '%' in Where class,
... WHERE CITY LIKE '%town%'.
This condition is true if the column CITY contains a string containing the pattern u2018townu2019.
... WHERE NAME NOT LIKE '_n%'.
This condition is true if the column NAME contains a value whose second character is not u2018nu2019.
04-17-2009 4:18 PM
You can use wild card characters like '%' in Where class,
... WHERE CITY LIKE '%town%'.
This condition is true if the column CITY contains a string containing the pattern u2018townu2019.
... WHERE NAME NOT LIKE '_n%'.
This condition is true if the column NAME contains a value whose second character is not u2018nu2019.
04-17-2009 4:21 PM
Hi,
FIELD LIKE 'ab%'.
If you want get all the entries in the second char is b then try this
FIELD LIKE '_b%'.
For more help refer to this link..how to use LIKE operator
http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3a1f358411d1829f0000e829fbfe/content.htm
04-17-2009 4:23 PM
hi,
Try this way
Select kunnr bukrs into table t_knb1
from knb1
for all entries in t_kna1
where kunnr = t_kna1-kunnr and
ernam ca 'ab'.
Depending on your need you can use the following.
CO (Contains Only)
CN (Contains Not only)
CA (Contains Any)
NA (contains Not Any)
CS (Contains String)
NS (contains No String)
CP (Contains Pattern)
NP (contains No Pattern)