Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8501

Re: Like operator in SAP Query

$
0
0

Hi Gobi...

 

The following SQL statement selects all Itemname with the letter "s":

 

 

Example

 

 

SELECT * FROM OITM

WHERE  Itemname LIKE 's%'

 

 

 

 

 

The following SQL statement selects all  Itemname ending with the letter "s":

 

 

Example

 

 

SELECT * FROM OITM

WHERE  Itemname LIKE '%s'

 

 

 

The following SQL statement selects all itemname with a the pattern "S":

 

 

Example

 

 

SELECT * FROM OITM

WHERE Country LIKE '%S%'

 

 

 

Using the NOT keyword allows you to select records that do NOT match the pattern.

 

 

The following SQL statement selects all items with itemname NOT containing the pattern

"TEST":

 

 

Example

 

 

SELECT * FROM OITM

WHERE itemname NOT LIKE '%test%'

 

Rgds

Kennedy


Viewing all articles
Browse latest Browse all 8501

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>