<?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 create index through connect statement  in SAS EG (odbc engine) in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-create-index-through-connect-statement-in-SAS-EG-odbc/m-p/893304#M43648</link>
    <description>&lt;P&gt;Create a LIBNAME to the SQL Server schema, then run&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create index zp on sqllib.dashboard_novacik (zp);
create index fin on sqllib.dashboard.novacik (fin);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But I would not be surprised if this does not work and you are forced to use explicit pass-through.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Sep 2023 13:43:58 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-09-08T13:43:58Z</dc:date>
    <item>
      <title>how to create index through connect statement  in SAS EG (odbc engine)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-create-index-through-connect-statement-in-SAS-EG-odbc/m-p/893266#M43645</link>
      <description>&lt;P&gt;how can i do this, but in sas eg (odbc engine) through implicit statements?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;connect to sqlsvr as mydb&lt;BR /&gt;(datasrc="SASDATA" user="sas" password="xxx");&lt;BR /&gt;select * from connection to mydb&lt;BR /&gt;(CREATE INDEX ZP on dashboard_novacik (ZP) ;&lt;BR /&gt;CREATE INDEX Fin on dashboard_novacik (Fin) ;&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code works in SAS Studio (sqlsvr engine).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 07:25:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-create-index-through-connect-statement-in-SAS-EG-odbc/m-p/893266#M43645</guid>
      <dc:creator>Pato485</dc:creator>
      <dc:date>2023-09-08T07:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to create index through connect statement  in SAS EG (odbc engine)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-create-index-through-connect-statement-in-SAS-EG-odbc/m-p/893268#M43646</link>
      <description>&lt;P&gt;Both SAS EG and SAS Studio are clients that connect to a SAS Server where the code executes.&lt;/P&gt;
&lt;P&gt;If you're connecting with both clients to the same environment with the same user then the same code will work using either client.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure about SQL Server but with many databases a Create Index would fail if the index already exists - meaning you would need to either first drop the index or check for existence.&lt;/P&gt;
&lt;P&gt;Something like:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1694158938710.png" style="width: 513px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87712i86EBC37436BA1EFB/image-dimensions/513x54?v=v2" width="513" height="54" role="button" title="Patrick_0-1694158938710.png" alt="Patrick_0-1694158938710.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 07:42:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-create-index-through-connect-statement-in-SAS-EG-odbc/m-p/893268#M43646</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-09-08T07:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to create index through connect statement  in SAS EG (odbc engine)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-create-index-through-connect-statement-in-SAS-EG-odbc/m-p/893289#M43647</link>
      <description>"select * from connection to mydb" is for create a table.&lt;BR /&gt;If you want execute other SQL statement,your code should look like this:&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;connect to sqlsvr as mydb&lt;BR /&gt;(datasrc="SASDATA" user="sas" password="xxx");&lt;BR /&gt;&lt;BR /&gt;execute(&lt;BR /&gt;CREATE INDEX ZP on dashboard_novacik (ZP) ;&lt;BR /&gt;CREATE INDEX Fin on dashboard_novacik (Fin) ;&lt;BR /&gt;) by mydb;&lt;BR /&gt;&lt;BR /&gt;QUIT;&lt;BR /&gt;&lt;BR /&gt;I am not very sure,check it more at support.sas.com  &lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/sqlproc/n0tpd3yaqvep53n1g8wahav3hgco.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/sqlproc/n0tpd3yaqvep53n1g8wahav3hgco.htm&lt;/A&gt;</description>
      <pubDate>Fri, 08 Sep 2023 11:59:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-create-index-through-connect-statement-in-SAS-EG-odbc/m-p/893289#M43647</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-09-08T11:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to create index through connect statement  in SAS EG (odbc engine)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-create-index-through-connect-statement-in-SAS-EG-odbc/m-p/893304#M43648</link>
      <description>&lt;P&gt;Create a LIBNAME to the SQL Server schema, then run&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create index zp on sqllib.dashboard_novacik (zp);
create index fin on sqllib.dashboard.novacik (fin);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But I would not be surprised if this does not work and you are forced to use explicit pass-through.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 13:43:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-create-index-through-connect-statement-in-SAS-EG-odbc/m-p/893304#M43648</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-09-08T13:43:58Z</dc:date>
    </item>
  </channel>
</rss>

