<?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 AW:Re: How to convert a type in where clause using SAP SQLConnector? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197433#M1229830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;During extraction you have to follow the syntax of sap data stored in sap table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Oct 2010 11:45:21 GMT</pubDate>
    <dc:creator>suniljain</dc:creator>
    <dc:date>2010-10-16T11:45:21Z</dc:date>
    <item>
      <title>How to convert a type in where clause using SAP SQLConnector?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197429#M1229820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I want to load some data from the LIKP table in SAP using the SAP SQLConnector. Furthermore I want to select the data for a specific period, but the date field in the table is not declared as a integer. If you look in the Oracle DBMS you will see, the field is declared as varchar.&lt;/P&gt;&lt;P&gt;My Question:&lt;/P&gt;&lt;P&gt;How can I convert the field in the WHERE clause that I can do a comparison to my selection criterion?&lt;/P&gt;&lt;P&gt;Here an example (LFDAT still has to be converted in a way I don't know):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;LIKP:&lt;BR /&gt;LOAD&lt;BR /&gt; VBELN as delivery_number,&lt;BR /&gt; LIFNR as supplier_number;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; VBELN,&lt;BR /&gt; LIFNR&lt;BR /&gt;FROM LIKP&lt;BR /&gt;WHERE LFDAT &amp;gt;= 20101013;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;BR /&gt;Jonas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 21:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197429#M1229820</guid>
      <dc:creator />
      <dc:date>2026-01-26T21:26:37Z</dc:date>
    </item>
    <item>
      <title>How to convert a type in where clause using SAP SQLConnector?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197430#M1229821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonas&lt;BR /&gt;I use this method because as you say the dates in SAP are usually kept as varchar. Don't forget to put the date in ' ' .&lt;BR /&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt; * ;&lt;BR /&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt; &lt;STRONG&gt;Select&lt;/STRONG&gt; VBELN, LIFNR&lt;BR /&gt;&lt;STRONG&gt;from&lt;/STRONG&gt; LIKP&lt;BR /&gt;WHERE ( LFDAT =&amp;gt; &lt;STRONG&gt;'&lt;/STRONG&gt;20000101&lt;STRONG&gt;'&lt;/STRONG&gt; ) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if you want other clauses you can use the like method on characteristic values.&lt;/P&gt;&lt;P&gt;AND (MATERIAL LIKE 'ABCD%' OR MATERIAL LIKE 'WXYZ%') ;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If you want to convert the date format you can use this.&lt;BR /&gt;DATE([LFDAT],'DD/MM/YYYY') &lt;B&gt;as&lt;/B&gt; Date // This will now be in correct date format when loaded into an App.&lt;BR /&gt;or&lt;BR /&gt;LEFT([LFDAT],4) &lt;B&gt;AS&lt;/B&gt; Date_Year // This will now be in a number format when loaded into an App e.g. 2000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Best Regards&lt;BR /&gt;Greenee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Oct 2010 17:24:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197430#M1229821</guid>
      <dc:creator />
      <dc:date>2010-10-13T17:24:14Z</dc:date>
    </item>
    <item>
      <title>AW:Re: How to convert a type in where clause using SAP SQLConnector?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197431#M1229824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Greenee,&lt;/P&gt;&lt;P&gt;I know that I have to put the date in ' '. But I'm looking for a solution to convert the date to number in the where clause like the oracle command to_number. Using this I could compare the field to a number, e.g. '...where to_number(LFDAT) &amp;gt;= 20101015'.&lt;/P&gt;&lt;P&gt;It is a good hint to use LIKE to compare a part of the string. It is useful if you need a whole year or month but it is not the best solution to select several months or a special date range.&lt;/P&gt;&lt;P&gt;Thank you for your help but maybe someone still has another idea to solve this problem, maybe you.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Jonas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Oct 2010 09:44:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197431#M1229824</guid>
      <dc:creator />
      <dc:date>2010-10-15T09:44:30Z</dc:date>
    </item>
    <item>
      <title>AW:Re: How to convert a type in where clause using SAP SQLConnector?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197432#M1229826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonas,&lt;/P&gt;&lt;P&gt;I tried converting the date field in char data type as well. However, it appears that Connector does'nt provide that flexibility.&lt;/P&gt;&lt;P&gt;hope if someone has an answer...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Oct 2010 11:51:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197432#M1229826</guid>
      <dc:creator />
      <dc:date>2010-10-15T11:51:12Z</dc:date>
    </item>
    <item>
      <title>AW:Re: How to convert a type in where clause using SAP SQLConnector?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197433#M1229830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;During extraction you have to follow the syntax of sap data stored in sap table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Oct 2010 11:45:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197433#M1229830</guid>
      <dc:creator>suniljain</dc:creator>
      <dc:date>2010-10-16T11:45:21Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: How to convert a type in where clause using SAP SQLConnector?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197434#M1229834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But what does it mean? Is there a SAP command I could use to convert the varchar into a number? Or does it mean that it is not possible to convert any data from SAP tables during extraction?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Oct 2010 12:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197434#M1229834</guid>
      <dc:creator />
      <dc:date>2010-10-16T12:53:41Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: How to convert a type in where clause using SAP SQLConnector?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197435#M1229838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;during extraction we have to follow actual format of data stored in sap r/3.&lt;/P&gt;&lt;P&gt;as for example date is like 20100101&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Oct 2010 16:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197435#M1229838</guid>
      <dc:creator>suniljain</dc:creator>
      <dc:date>2010-10-16T16:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: AW:Re: AW:Re: How to convert a type in where clause using SAP SQLConnector?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197436#M1229842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use a variable :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIKP:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt; VBELN as delivery_number,&lt;/P&gt;&lt;P&gt; LIFNR as supplier_number;&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt; VBELN,&lt;/P&gt;&lt;P&gt; LIFNR&lt;/P&gt;&lt;P&gt;FROM LIKP&lt;/P&gt;&lt;P&gt;WHERE LFDAT &amp;gt;= '$(vStartDate)';&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable has the value like &lt;SPAN style="font-size: 8pt;"&gt;20120101 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Chris&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 08:45:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-convert-a-type-in-where-clause-using-SAP-SQLConnector/m-p/197436#M1229842</guid>
      <dc:creator />
      <dc:date>2012-09-13T08:45:34Z</dc:date>
    </item>
  </channel>
</rss>

