<?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 Writing datasets using OleDB SQL queries. How to CREATE TABLE and compress string fields? in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Writing-datasets-using-OleDB-SQL-queries-How-to-CREATE-TABLE-and/m-p/134929#M1478</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the SAS IOM OleDB provider to create and populate SAS tables via execution of SQL statements.&lt;/P&gt;&lt;P&gt;All is working fine, but, for creation of string fields, I am defaulting to a length of 400 because I cannot know the maximum string length in advance.&lt;/P&gt;&lt;P&gt;This results in very large disk space usage for string fields.&lt;/P&gt;&lt;P&gt;One option is to somehow set COMPRESS = CHAR as part of my CREATE TABLE&amp;nbsp; execution, or some other command I can execute on the connection.&lt;/P&gt;&lt;P&gt;Does anyone know how to do this, or can suggest anything else to help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;K&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;evin&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jul 2014 11:10:24 GMT</pubDate>
    <dc:creator>keV</dc:creator>
    <dc:date>2014-07-24T11:10:24Z</dc:date>
    <item>
      <title>Writing datasets using OleDB SQL queries. How to CREATE TABLE and compress string fields?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Writing-datasets-using-OleDB-SQL-queries-How-to-CREATE-TABLE-and/m-p/134929#M1478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the SAS IOM OleDB provider to create and populate SAS tables via execution of SQL statements.&lt;/P&gt;&lt;P&gt;All is working fine, but, for creation of string fields, I am defaulting to a length of 400 because I cannot know the maximum string length in advance.&lt;/P&gt;&lt;P&gt;This results in very large disk space usage for string fields.&lt;/P&gt;&lt;P&gt;One option is to somehow set COMPRESS = CHAR as part of my CREATE TABLE&amp;nbsp; execution, or some other command I can execute on the connection.&lt;/P&gt;&lt;P&gt;Does anyone know how to do this, or can suggest anything else to help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;K&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;evin&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 11:10:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Writing-datasets-using-OleDB-SQL-queries-How-to-CREATE-TABLE-and/m-p/134929#M1478</guid>
      <dc:creator>keV</dc:creator>
      <dc:date>2014-07-24T11:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Writing datasets using OleDB SQL queries. How to CREATE TABLE and compress string fields?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Writing-datasets-using-OleDB-SQL-queries-How-to-CREATE-TABLE-and/m-p/134930#M1479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/sqlproc/63043/HTML/default/viewer.htm#n1g7gz9jcpnqi8n1j3oaeznsihd3.htm" title="http://support.sas.com/documentation/cdl/en/sqlproc/63043/HTML/default/viewer.htm#n1g7gz9jcpnqi8n1j3oaeznsihd3.htm"&gt;SAS(R) 9.3 SQL Procedure User's Guide&lt;/A&gt; (dataset options). Did you try it coding as a SAS dataset option?&lt;/P&gt;&lt;P&gt;IT will do RLE optimizing causing some overhead in the CPU but of you have many of those the gaining in IO could be a far more better trade off. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 11:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Writing-datasets-using-OleDB-SQL-queries-How-to-CREATE-TABLE-and/m-p/134930#M1479</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-07-24T11:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Writing datasets using OleDB SQL queries. How to CREATE TABLE and compress string fields?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Writing-datasets-using-OleDB-SQL-queries-How-to-CREATE-TABLE-and/m-p/134931#M1480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did not realise it was as simple as changing "CREATE TABLE (" to "CREATE table (compress=char, " into my CommandText.&lt;/P&gt;&lt;P&gt;On my test table, what was 312Mb is now 12 Mb (262,144 rows with 3 string fields). Very impressive size reduction, and it writes20%&amp;nbsp; faster too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 14:18:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Writing-datasets-using-OleDB-SQL-queries-How-to-CREATE-TABLE-and/m-p/134931#M1480</guid>
      <dc:creator>keV</dc:creator>
      <dc:date>2014-07-24T14:18:58Z</dc:date>
    </item>
  </channel>
</rss>

