<?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: ORA-01858 error in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42632#M11096</link>
    <description>Guys I have found out the problem and fixed it. If anyone face this problem again,&lt;BR /&gt;
please bear in mind that Oracle date and SAS date formats are not at all same. You have to explicitly give the date format in your select query written in proc sql.&lt;BR /&gt;
eg. The following statement &lt;BR /&gt;
 select 'a' from dual where sysdate='21/JAN/2010' will work in sql prompt.&lt;BR /&gt;
&lt;BR /&gt;
But if you embed it in SAS there is a problem. You have to modify this statement into &lt;BR /&gt;
     select 'a' from dual where sysdate= to_date('21/JAN/2010','dd/mon/yyyy')&lt;BR /&gt;
&lt;BR /&gt;
thanks everyone ...</description>
    <pubDate>Wed, 20 Jan 2010 09:15:20 GMT</pubDate>
    <dc:creator>PS</dc:creator>
    <dc:date>2010-01-20T09:15:20Z</dc:date>
    <item>
      <title>ORA-01858 error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42626#M11090</link>
      <description>Hi All,&lt;BR /&gt;
 I am a begineer in SAS and trying to create a data set through SAS from a Oracle table. The SQL query is running fine in sql prompt but when I embed the sql in SAS and try to write the o/p, it throws the error below:&lt;BR /&gt;
 "ERROR: ORACLE execute error: ORA-01858: a non-numeric character was found where a numeric was expected"&lt;BR /&gt;
&lt;BR /&gt;
If I ommit the put command, the program runs fine. Can anyone please help me out.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Premjit</description>
      <pubDate>Tue, 19 Jan 2010 14:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42626#M11090</guid>
      <dc:creator>PS</dc:creator>
      <dc:date>2010-01-19T14:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-01858 error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42627#M11091</link>
      <description>Since you include no code, and do not specify what the put command is doing I can only assume you are using a numeric format on a character value.&lt;BR /&gt;
A lot more info would be needed to get specific.</description>
      <pubDate>Tue, 19 Jan 2010 15:06:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42627#M11091</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2010-01-19T15:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-01858 error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42628#M11092</link>
      <description>Also, you may want to search the SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website first - here is a match on the error number/message you referenced.&lt;BR /&gt;
&lt;BR /&gt;
Useful information also would be your SAS version, the OS where you are running, and whether you (or other individuals) have other SAS code working successfully accessing ORACLE.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument on this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
ora-01858 numeric expected site:sas.com</description>
      <pubDate>Tue, 19 Jan 2010 15:19:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42628#M11092</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-01-19T15:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-01858 error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42629#M11093</link>
      <description>The error is Oracle  &lt;A href="http://www.orafaq.com/wiki/ORA-01858" target="_blank"&gt;http://www.orafaq.com/wiki/ORA-01858&lt;/A&gt;  You are converting an improper date.</description>
      <pubDate>Tue, 19 Jan 2010 15:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42629#M11093</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2010-01-19T15:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-01858 error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42630#M11094</link>
      <description>Yes I have date feilds but I have converted it to character while selecting e.g to_char(ambs.D_CLSE,'yyyy-mm-dd') .&lt;BR /&gt;
&lt;BR /&gt;
The put statement is as below:&lt;BR /&gt;
&lt;BR /&gt;
disconnect from oracle;&lt;BR /&gt;
quit;&lt;BR /&gt;
filename out "$DDIR/trmd699b.dat" ;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
set v_credit_card;&lt;BR /&gt;
file out noprint notitles dlm=',' DSD DROPOVER LRECL=32767;&lt;BR /&gt;
put &lt;BR /&gt;
	N_ACCT&lt;BR /&gt;
	N_CLG&lt;BR /&gt;
	N_CUST_01&lt;BR /&gt;
	N_CUST_02&lt;BR /&gt;
	N_CUST_03&lt;BR /&gt;
	N_CUST_04&lt;BR /&gt;
	N_CUST_05&lt;BR /&gt;
	N_CBS_SCOR_RAW_01&lt;BR /&gt;
	N_CBS_SCOR_RAW_02&lt;BR /&gt;
	N_CBS_SCOR_RAW_03&lt;BR /&gt;
	N_CBS_SCOR_RAW_04&lt;BR /&gt;
	N_CBS_SCOR_RAW_05&lt;BR /&gt;
	N_CBS_SCOR_FINL_01&lt;BR /&gt;
	N_CBS_SCOR_FINL_02&lt;BR /&gt;
	N_CBS_SCOR_FINL_03&lt;BR /&gt;
	N_CBS_SCOR_FINL_04&lt;BR /&gt;
	N_CBS_SCOR_FINL_05&lt;BR /&gt;
        ------------------------------------------&lt;BR /&gt;
        ------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
 run;</description>
      <pubDate>Wed, 20 Jan 2010 03:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42630#M11094</guid>
      <dc:creator>PS</dc:creator>
      <dc:date>2010-01-20T03:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-01858 error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42631#M11095</link>
      <description>Is there a way by which I can force SAS to treat all variables as character instead of number. I basically want to override SAS's approcah of treating everything as NUMBER</description>
      <pubDate>Wed, 20 Jan 2010 07:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42631#M11095</guid>
      <dc:creator>PS</dc:creator>
      <dc:date>2010-01-20T07:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-01858 error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42632#M11096</link>
      <description>Guys I have found out the problem and fixed it. If anyone face this problem again,&lt;BR /&gt;
please bear in mind that Oracle date and SAS date formats are not at all same. You have to explicitly give the date format in your select query written in proc sql.&lt;BR /&gt;
eg. The following statement &lt;BR /&gt;
 select 'a' from dual where sysdate='21/JAN/2010' will work in sql prompt.&lt;BR /&gt;
&lt;BR /&gt;
But if you embed it in SAS there is a problem. You have to modify this statement into &lt;BR /&gt;
     select 'a' from dual where sysdate= to_date('21/JAN/2010','dd/mon/yyyy')&lt;BR /&gt;
&lt;BR /&gt;
thanks everyone ...</description>
      <pubDate>Wed, 20 Jan 2010 09:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ORA-01858-error/m-p/42632#M11096</guid>
      <dc:creator>PS</dc:creator>
      <dc:date>2010-01-20T09:15:20Z</dc:date>
    </item>
  </channel>
</rss>

