<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic LIKE in a SELECT statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/like-in-a-select-statement/m-p/3526862#M848476</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to use LIKE keyword in a SELECT statement more than once?  If not, is there any alternate way of doing this?  I am not getting anything returned when I use it twice on the same field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table CDPOS with field TABKEY which is 70 CHAR long.  &lt;/P&gt;&lt;P&gt;Value of field TABKEY in table CDPOS = '00003001001PR00'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINEITEM =  '000030%'&lt;/P&gt;&lt;P&gt;CONDITION = 'PR00%'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the following select statement to retrieve the above CDPOS value..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select objectid changenr from cdpos into table tmp_cdpos             &lt;/P&gt;&lt;P&gt;where tabkey like LINEITEM and tabkey like CONDITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use just 'lineitem'  with the LIKE, it works but adding 'tabkey' results in no hits.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Mar 2008 16:24:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-11T16:24:46Z</dc:date>
    <item>
      <title>LIKE in a SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/like-in-a-select-statement/m-p/3526862#M848476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to use LIKE keyword in a SELECT statement more than once?  If not, is there any alternate way of doing this?  I am not getting anything returned when I use it twice on the same field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table CDPOS with field TABKEY which is 70 CHAR long.  &lt;/P&gt;&lt;P&gt;Value of field TABKEY in table CDPOS = '00003001001PR00'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINEITEM =  '000030%'&lt;/P&gt;&lt;P&gt;CONDITION = 'PR00%'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the following select statement to retrieve the above CDPOS value..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select objectid changenr from cdpos into table tmp_cdpos             &lt;/P&gt;&lt;P&gt;where tabkey like LINEITEM and tabkey like CONDITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use just 'lineitem'  with the LIKE, it works but adding 'tabkey' results in no hits.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 16:24:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-in-a-select-statement/m-p/3526862#M848476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T16:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: LIKE in a SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/like-in-a-select-statement/m-p/3526863#M848477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use OR instead of AND in the select statement then it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select objectid changenr from cdpos into table tmp_cdpos &lt;/P&gt;&lt;P&gt;          where tabkey like LINEITEM &lt;/P&gt;&lt;P&gt;              OR tabkey like CONDITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 16:33:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-in-a-select-statement/m-p/3526863#M848477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T16:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: LIKE in a SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/like-in-a-select-statement/m-p/3526864#M848478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;change CONDITION = 'PR00%' &lt;/P&gt;&lt;P&gt;to CONDITION = '%PR00'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The % represents the variable portion of the condition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 16:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-in-a-select-statement/m-p/3526864#M848478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T16:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: LIKE in a SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/like-in-a-select-statement/m-p/3526865#M848479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM cdpos
  WHERE tabkey LIKE '000030_____PR00%'.    &amp;lt;== Underscores&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 16:38:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-in-a-select-statement/m-p/3526865#M848479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T16:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: LIKE in a SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/like-in-a-select-statement/m-p/3526866#M848480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You, Rob.  Your solution worked.&lt;/P&gt;&lt;P&gt;Anjana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 16:49:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/like-in-a-select-statement/m-p/3526866#M848480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T16:49:50Z</dc:date>
    </item>
  </channel>
</rss>

