<?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: How to get data from Oracle using Native SQL in SAP.. Problem with date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-oracle-using-native-sql-in-sap-problem-with-date/m-p/7486258#M1556842</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please refer the example in this link which deals with Oracle date format.&lt;/P&gt;&lt;P&gt;You can finnd a command &lt;STRONG&gt;DECODE&lt;/STRONG&gt; which is used for date formats. If you have a look at whole theory then you will get an idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Dec 2010 14:56:50 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2010-12-01T14:56:50Z</dc:date>
    <item>
      <title>How to get data from Oracle using Native SQL in SAP.. Problem with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-oracle-using-native-sql-in-sap-problem-with-date/m-p/7486257#M1556841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Masters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to get data from an Oracle DB. I was able to connect to Oracle using tcode DBCO. The connetion works fine&lt;/P&gt;&lt;P&gt;I wrote this code and it works fine without the statement of where date &amp;gt; '01-09-2010'&lt;/P&gt;&lt;P&gt;But i need that statement on the select. I read a lot about this issue, but no answer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is (this code is in SAP ECC 6.0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: BEGIN OF datos OCCURS 0,
      id_numeric(10),
      component_name(40),
      comuna(10),
      record_id(10),
      status,
      sampled_date(10),
      END OF datos.
DATA: c TYPE cursor.

EXEC SQL.
  connect to 'LIM' as 'MYDB'
ENDEXEC.

EXEC SQL.
  SET CONNECTION 'MYDB'
ENDEXEC.

EXEC SQL PERFORMING loop_output.
  SELECT ID_NUMERIC, COMPONENT_NAME, COMUNA, RECORD_ID, STATUS, SAMPLED_DATE
  into :datos from lims.SAMP_TEST_RESULT
  where	date &amp;gt; '01-09-2010'
ENDEXEC.

EXEC SQL.
  disconnect 'MYDB'
ENDEXEC.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i get the data from that date?? If i delete the where statemet, the program works well, it takes 30 mins and show all the data, I just need the data from that date.&lt;/P&gt;&lt;P&gt;Any help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Dec 2010 14:47:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-oracle-using-native-sql-in-sap-problem-with-date/m-p/7486257#M1556841</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-01T14:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from Oracle using Native SQL in SAP.. Problem with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-oracle-using-native-sql-in-sap-problem-with-date/m-p/7486258#M1556842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please refer the example in this link which deals with Oracle date format.&lt;/P&gt;&lt;P&gt;You can finnd a command &lt;STRONG&gt;DECODE&lt;/STRONG&gt; which is used for date formats. If you have a look at whole theory then you will get an idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Dec 2010 14:56:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-oracle-using-native-sql-in-sap-problem-with-date/m-p/7486258#M1556842</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-12-01T14:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from Oracle using Native SQL in SAP.. Problem with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-oracle-using-native-sql-in-sap-problem-with-date/m-p/7486259#M1556843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A better way to solve this problem was to ask a Basis guy to create a table in SAP pointing to a table in Oracle, so that's how we solve the issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 13:10:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-data-from-oracle-using-native-sql-in-sap-problem-with-date/m-p/7486259#M1556843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-02T13:10:17Z</dc:date>
    </item>
  </channel>
</rss>

