<?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 Re: Using Like in Select Query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149021#M992146</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the variable name. In the select query just search with  'svar%' or svar+'%' . After the select query you can pass it into the variable. Try it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jul 2008 12:16:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-23T12:16:51Z</dc:date>
    <item>
      <title>Using Like in Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149018#M992143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to ABAP so i don't know how relevant the question is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a variable say svar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want a select query using LIKE that helps me fetch data that starts with svar.&lt;/P&gt;&lt;P&gt;Something like 'ABC%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only thing here is that it is a variable so i cannot use: 'svar%' or svar+'%' or anything like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Avinash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2008 12:12:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149018#M992143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-23T12:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using Like in Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149019#M992144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your variable has to contain 'SVAR' and %, than it will work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE field LIKE variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;varibale's value is 'SVAR%', all records will be selected where field starts with 'SVAR'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2008 12:15:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149019#M992144</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-07-23T12:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using Like in Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149020#M992145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS srch_str(20) TYPE c. &lt;/P&gt;&lt;P&gt;CONCATENATE '%' srch_str '%' INTO srch_str. &lt;/P&gt;&lt;P&gt;DATA text_tab TYPE TABLE OF doktl. &lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM doktl &lt;/P&gt;&lt;P&gt;       INTO TABLE text_tab &lt;/P&gt;&lt;P&gt;       WHERE doktext LIKE srch_str.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;% is for single char&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; is for string of char&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2008 12:15:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149020#M992145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-23T12:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using Like in Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149021#M992146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the variable name. In the select query just search with  'svar%' or svar+'%' . After the select query you can pass it into the variable. Try it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2008 12:16:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149021#M992146</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-23T12:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Like in Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149022#M992147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can use like in the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if u want the comparision to be done with a variable..then u can not use like in that case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one thing u can do..If u know the postioning of the letters in the table field that are to be compared with the var1. then u can achieve this. Supose u want to compare 4 characters in the table field starting with the 3rd digit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in the where condition u can write something as...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where zfield+2(4) = WF_VAR1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2008 12:19:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149022#M992147</guid>
      <dc:creator>former_member195383</dc:creator>
      <dc:date>2008-07-23T12:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Like in Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149023#M992148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the sample ././&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to use the LIKE in select statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZTEST_SIMPLE.

data: svar(4).
data: it_flight type sflight_tab1.
svar = 'A%'.


select * from sflight
into table it_flight
where carrid like svar.

break-point.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2008 12:25:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149023#M992148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-23T12:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using Like in Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149024#M992149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried the same thing but it gave an error that no such field exists.&lt;/P&gt;&lt;P&gt;What I mean is if I modify the field on which the search is based..it says no such field exist.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2008 12:25:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149024#M992149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-23T12:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using Like in Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149025#M992150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone, a small error on my part also.&lt;/P&gt;&lt;P&gt;Yes If I append the variable by the wild card character it works...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was doing a small mistake with that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2008 12:30:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149025#M992150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-23T12:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using Like in Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149026#M992151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so that i can see what is the error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2008 12:30:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149026#M992151</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-23T12:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using Like in Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149027#M992152</link>
      <description>&lt;P&gt;&lt;A rel="nofollow" href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenwhere_logexp_like.htm"&gt;sql_cond - LIKE&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;``The use of the wildcard characters "_" and "%" corresponds to the standard of SQL.``&lt;/P&gt;&lt;P&gt;&lt;A rel="nofollow" href="https://docs.microsoft.com/en-us/sql/t-sql/language-elements/like-transact-sql?view=sql-server-ver16"&gt;SQL LIKE&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;Wildcard character Description Example&lt;/P&gt;&lt;P&gt;% Any string of zero or more characters. WHERE title LIKE '%computer%' finds all book titles with the word 'computer' anywhere in the book title.&lt;/P&gt;&lt;P&gt;_ (underscore) Any single character. WHERE au_fname LIKE '_ean' finds all four-letter first names that end with ean (Dean, Sean, and so on).&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 13:15:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149027#M992152</guid>
      <dc:creator>laszlo_kajan2</dc:creator>
      <dc:date>2022-06-02T13:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using Like in Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149028#M992153</link>
      <description>&lt;P&gt;SELECT CASE&lt;/P&gt;


&lt;P&gt;	    WHEN pac.PAC_NOME LIKE 'RN%' THEN ESP.ESP_COD = 'PED'&lt;/P&gt;
&lt;P&gt;    ELSE ESP.ESP_COD &lt;/P&gt;
&lt;P&gt;    END ESPECIALIDADEID   &lt;/P&gt;
&lt;P&gt;	-- v.ESPECIALIDADE as  especialidadedescricao,    &lt;/P&gt;

&lt;P&gt;   -- 'O' AS fonte&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;    PAC&lt;/P&gt;
&lt;P&gt;    INNER JOIN HSP ON HSP.HSP_PAC = PAC.PAC_REG&lt;/P&gt;
&lt;P&gt;    INNER JOIN v_esp_medico v ON hsp.hsp_mde = v.MEDICO&lt;/P&gt;
&lt;P&gt;    INNER JOIN esp ON esp.ESP_NOME = v.ESPECIALIDADE&lt;/P&gt;
&lt;P&gt;    INNER JOIN LOC ON LOC.LOC_COD = HSP.HSP_LOC&lt;/P&gt;
&lt;P&gt;    INNER JOIN STR ON STR.STR_COD = LOC.LOC_STR&lt;/P&gt;
&lt;P&gt;    INNER JOIN SMK ON hsp.hsp_proc1 = smk.smk_cod&lt;/P&gt;
&lt;P&gt;WHERE HSP_dthra &amp;gt;= :data_ini&lt;/P&gt;
&lt;P&gt;    AND hsp_dthra &amp;lt;= :data_final&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SQL Error [42000]: [-5015] (at 68): Missing keyword:END&lt;BR /&gt;&lt;BR /&gt;BECAUSE?&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 05:05:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149028#M992153</guid>
      <dc:creator>former_member974711</dc:creator>
      <dc:date>2023-09-04T05:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using Like in Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149029#M992154</link>
      <description>Hello,  &lt;BR /&gt;&lt;BR /&gt;While we're happy that you've come to SAP Community to get an answer to your question, you posted your question as an answer in an old thread.&lt;BR /&gt;I've converted your answer to a comment, but even so -- posting in older threads is not the best way to get guidance.&lt;BR /&gt;If you're looking for help, you should ask a new question: &lt;A href="https://answers.sap.com/questions/ask.html" target="test_blank"&gt;https://answers.sap.com/questions/ask.html&lt;/A&gt;.&lt;BR /&gt;Here are some tips to help you craft an effective question for our community: &lt;A href="https://community.sap.com/resources/questions-and-answers" target="test_blank"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt;, &lt;A href="https://developers.sap.com/tutorials/community-qa.html" target="test_blank"&gt;https://developers.sap.com/tutorials/community-qa.html&lt;/A&gt;, &lt;A href="https://groups.community.sap.com/t5/welcome-corner-discussions/advice-from-sap-champions-questions-and-answers/m-p/123609" target="test_blank"&gt;https://groups.community.sap.com/t5/welcome-corner-discussions/advice-from-sap-champions-questions-and-answers/m-p/123609&lt;/A&gt;.&lt;BR /&gt;I encourage you to follow this guidance, as I'd really like to see you get a solution to your problem.&lt;BR /&gt;I hope you find this advice useful!</description>
      <pubDate>Mon, 04 Sep 2023 05:06:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-like-in-select-query/m-p/4149029#M992154</guid>
      <dc:creator>moshenaveh</dc:creator>
      <dc:date>2023-09-04T05:06:33Z</dc:date>
    </item>
  </channel>
</rss>

