<?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: Enforcing a blank value as being NULL so that load to Oracle fails. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Enforcing-a-blank-value-as-being-NULL-so-that-load-to-Oracle/m-p/880893#M348067</link>
    <description>&lt;P&gt;You can try the NULLCHAR=YES option:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/doc/en/pgmsascdc/v_040/acreldb/n1hmopc3y74oy2n1svhu03pfoiy9.htm" target="_blank"&gt;SAS Help Center: NULLCHAR= Data Set Option&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jun 2023 11:00:11 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2023-06-15T11:00:11Z</dc:date>
    <item>
      <title>Enforcing a blank value as being NULL so that load to Oracle fails.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enforcing-a-blank-value-as-being-NULL-so-that-load-to-Oracle/m-p/880884#M348060</link>
      <description>&lt;P&gt;I have created a table in Oracle with a column FIELD1 which is defined as VARCHAR2(20 BYTE)&amp;nbsp; NOT NULL.&lt;/P&gt;&lt;P&gt;Users are able to append data to this table using SAS Enterprise Guide.&lt;/P&gt;&lt;P&gt;I need to prevent them from appending data where FIELD1 is blank.&lt;/P&gt;&lt;P&gt;However if the users make FIELD1 ='' in SAS (ie. blank or empty) they are able to append to the Oracle table so NOT NULL is not doing the trick.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appears that SAS interprets = ''&amp;nbsp; as a character field with a length of 1&amp;nbsp; rather than a null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 09:54:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enforcing-a-blank-value-as-being-NULL-so-that-load-to-Oracle/m-p/880884#M348060</guid>
      <dc:creator>KirstenM</dc:creator>
      <dc:date>2023-06-15T09:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Enforcing a blank value as being NULL so that load to Oracle fails.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enforcing-a-blank-value-as-being-NULL-so-that-load-to-Oracle/m-p/880893#M348067</link>
      <description>&lt;P&gt;You can try the NULLCHAR=YES option:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/doc/en/pgmsascdc/v_040/acreldb/n1hmopc3y74oy2n1svhu03pfoiy9.htm" target="_blank"&gt;SAS Help Center: NULLCHAR= Data Set Option&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 11:00:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enforcing-a-blank-value-as-being-NULL-so-that-load-to-Oracle/m-p/880893#M348067</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-06-15T11:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Enforcing a blank value as being NULL so that load to Oracle fails.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enforcing-a-blank-value-as-being-NULL-so-that-load-to-Oracle/m-p/880912#M348076</link>
      <description>&lt;P&gt;In SAS there is no difference between an all blank character variable and missing value.&amp;nbsp; Character strings are fixed length.&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;So if you don't want them to insert blanks then tell them not to set the value to blanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I question the value of allowing the Oracle table to accept a value that is blank anyway as you seem to want to exclude missing values.&amp;nbsp; What is the difference between an all blank value and a null that you are trying to detect?&amp;nbsp; How are you going to tell the difference between a character string that is only blanks and one that is "empty"?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 12:59:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enforcing-a-blank-value-as-being-NULL-so-that-load-to-Oracle/m-p/880912#M348076</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-15T12:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Enforcing a blank value as being NULL so that load to Oracle fails.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enforcing-a-blank-value-as-being-NULL-so-that-load-to-Oracle/m-p/880913#M348077</link>
      <description>&lt;P&gt;SAS variables are fixed length and padded with spaces.&amp;nbsp; So assigning ' ' or '' to a character variable will result in all spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might try using the TRIMN() function.&amp;nbsp; That will return a completely empty string when the value only contains spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;insert into myora.mytable select id,trimn(name),age from have.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Jun 2023 13:03:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enforcing-a-blank-value-as-being-NULL-so-that-load-to-Oracle/m-p/880913#M348077</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-15T13:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Enforcing a blank value as being NULL so that load to Oracle fails.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enforcing-a-blank-value-as-being-NULL-so-that-load-to-Oracle/m-p/880917#M348079</link>
      <description>&lt;P&gt;The first result from google search of this issue is this thread from 5 years ago.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Data-Management/Insert-SAS-Character-Blank-as-Oracle-NULL/td-p/503632" target="_blank"&gt;https://communities.sas.com/t5/SAS-Data-Management/Insert-SAS-Character-Blank-as-Oracle-NULL/td-p/503632&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 13:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enforcing-a-blank-value-as-being-NULL-so-that-load-to-Oracle/m-p/880917#M348079</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-15T13:38:28Z</dc:date>
    </item>
  </channel>
</rss>

