<?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 Proc SQL gives strange numeric error (extracted from Oracle DB) in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Proc-SQL-gives-strange-numeric-error-extracted-from-Oracle-DB/m-p/541426#M7367</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Given the incompleteness of the description below, I am rather looking for your ideas of what might be wrong, rather than a full solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Situation&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;-- X64_SRV12 WIN 6.2.9200&amp;nbsp; Server&lt;/P&gt;&lt;P&gt;-- Oracle database&lt;/P&gt;&lt;P&gt;-- SAS 9.4.3.0, SAS EG 7.12&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a variable called "nosig" that is an integer between 0 and 400.&lt;/P&gt;&lt;P&gt;I have a very simple SAS&amp;nbsp;PROC SQL query that extracts the "nosig" from the Oracle database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the&amp;nbsp;subsequent data step, I filter on nosig outside the above range, i.e. below 0 or above 400.&lt;/P&gt;&lt;P&gt;This dataset should always be empty, as no such nosigs are expected and we know no such data are in the Oracle database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I run this &lt;STRONG&gt;SAME IDENTICAL&lt;/STRONG&gt; query 10 times.&lt;/P&gt;&lt;P&gt;Usually,&amp;nbsp;I get very strange results in at least one of these 10 runs (see attached pictures).&lt;/P&gt;&lt;P&gt;Sometimes, the ten runs produce correct results (i.e. no strange "nosig" values).&lt;/P&gt;&lt;P&gt;Sometimes, up to 7 runs ouf of 10&amp;nbsp;produce incorrect results.&lt;/P&gt;&lt;P&gt;But I repeat, the query is always the same, the underlying data have not changed between the iterations, and the database actually does not include any of the shown incorrect nosig values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The wrong nosig numbers are usually either extremely small or extremely high.&lt;/P&gt;&lt;P&gt;There are often hundreds of thousands of rows with incorrect nosigs, but only a handful of &lt;STRONG&gt;unique&lt;/STRONG&gt; incorrect values (see pictures).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the same query is run directly in the SQL,&amp;nbsp;without passing through&amp;nbsp;SAS proc SQL,&amp;nbsp;no such error ever occurres.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given this information, does this suggest it is a problem of Oracle client, or of the SAS driver ODBC?&lt;/P&gt;&lt;P&gt;How can I&amp;nbsp;possibly find out what the problem is?&lt;/P&gt;&lt;P&gt;Any ideas why the results vary between runs?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2019 15:28:28 GMT</pubDate>
    <dc:creator>-_-</dc:creator>
    <dc:date>2019-03-08T15:28:28Z</dc:date>
    <item>
      <title>Proc SQL gives strange numeric error (extracted from Oracle DB)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-SQL-gives-strange-numeric-error-extracted-from-Oracle-DB/m-p/541426#M7367</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Given the incompleteness of the description below, I am rather looking for your ideas of what might be wrong, rather than a full solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Situation&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;-- X64_SRV12 WIN 6.2.9200&amp;nbsp; Server&lt;/P&gt;&lt;P&gt;-- Oracle database&lt;/P&gt;&lt;P&gt;-- SAS 9.4.3.0, SAS EG 7.12&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a variable called "nosig" that is an integer between 0 and 400.&lt;/P&gt;&lt;P&gt;I have a very simple SAS&amp;nbsp;PROC SQL query that extracts the "nosig" from the Oracle database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the&amp;nbsp;subsequent data step, I filter on nosig outside the above range, i.e. below 0 or above 400.&lt;/P&gt;&lt;P&gt;This dataset should always be empty, as no such nosigs are expected and we know no such data are in the Oracle database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I run this &lt;STRONG&gt;SAME IDENTICAL&lt;/STRONG&gt; query 10 times.&lt;/P&gt;&lt;P&gt;Usually,&amp;nbsp;I get very strange results in at least one of these 10 runs (see attached pictures).&lt;/P&gt;&lt;P&gt;Sometimes, the ten runs produce correct results (i.e. no strange "nosig" values).&lt;/P&gt;&lt;P&gt;Sometimes, up to 7 runs ouf of 10&amp;nbsp;produce incorrect results.&lt;/P&gt;&lt;P&gt;But I repeat, the query is always the same, the underlying data have not changed between the iterations, and the database actually does not include any of the shown incorrect nosig values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The wrong nosig numbers are usually either extremely small or extremely high.&lt;/P&gt;&lt;P&gt;There are often hundreds of thousands of rows with incorrect nosigs, but only a handful of &lt;STRONG&gt;unique&lt;/STRONG&gt; incorrect values (see pictures).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the same query is run directly in the SQL,&amp;nbsp;without passing through&amp;nbsp;SAS proc SQL,&amp;nbsp;no such error ever occurres.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given this information, does this suggest it is a problem of Oracle client, or of the SAS driver ODBC?&lt;/P&gt;&lt;P&gt;How can I&amp;nbsp;possibly find out what the problem is?&lt;/P&gt;&lt;P&gt;Any ideas why the results vary between runs?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 15:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-SQL-gives-strange-numeric-error-extracted-from-Oracle-DB/m-p/541426#M7367</guid>
      <dc:creator>-_-</dc:creator>
      <dc:date>2019-03-08T15:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL gives strange numeric error (extracted from Oracle DB)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-SQL-gives-strange-numeric-error-extracted-from-Oracle-DB/m-p/541428#M7368</link>
      <description>&lt;P&gt;It would likely be very helpful to include the LOG results from the connection and the proc sql including the code sections and any notes, messages, warnings or errors.&lt;/P&gt;
&lt;P&gt;Edit connection passwords and such but any other option text should be included. Do NOT post a picture of the Log result. Copy from the log and paste into a code box opened using the forum's {I} icon to preserve layout from the log. The main message windows here will reformat text, sometimes making code very hard to read.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The text is easier to copy/paste for pointing out issues and can be highlighted or syntax suggestions made easier. I know that I am not interested in retyping lots of code to point out one small suggestion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 15:35:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-SQL-gives-strange-numeric-error-extracted-from-Oracle-DB/m-p/541428#M7368</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-08T15:35:48Z</dc:date>
    </item>
  </channel>
</rss>

