<?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 Write tera query in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Write-tera-query-in-sas/m-p/804957#M317043</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I have a query tat someone wrote and run it on teradata.&lt;/P&gt;
&lt;P&gt;My task is to run this query in SAS.&lt;/P&gt;
&lt;P&gt;Please find the general form of the query that was run on teradata&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/***Query that was run on teradata**/
CREATE VOLATILE TABLE  ttt  AS (
SELECT
FROM  
WHERE		
  )
WITH DATA  PRIMARY INDEX (Branch_Cust_IP) ON COMMIT PRESERVE ROWS;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have tried to convert the query to sas environment and run it in SAS.&lt;/P&gt;
&lt;P&gt;Please see the general form of the query that I run in sas&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table ttt  (index=(Branch_Cust_IP/unique)) AS
SELECT
FROM 
where    
;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get an error&lt;/P&gt;
&lt;PRE&gt;ERROR: Duplicate values not allowed on index Branch_Cust_IP for file ttt.
NOTE: Compressing data set WORK.ttt decreased size by 40.21 percent. 
      Compressed is 127453 pages; un-compressed would require 213157 pages.
ERROR: Index creation failed for one or more indexes.&lt;/PRE&gt;
&lt;P&gt;My question- How can I solve the problem. Please note that in teradata it is running well.&lt;/P&gt;
&lt;P&gt;Please also note that my connection from sas to teradata base is done by adding&amp;nbsp;TeraData. before the table name (The admin person created this connection between sas and tera so in this issue it is working well)&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2022 06:08:34 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2022-03-30T06:08:34Z</dc:date>
    <item>
      <title>Write tera query in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Write-tera-query-in-sas/m-p/804957#M317043</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I have a query tat someone wrote and run it on teradata.&lt;/P&gt;
&lt;P&gt;My task is to run this query in SAS.&lt;/P&gt;
&lt;P&gt;Please find the general form of the query that was run on teradata&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/***Query that was run on teradata**/
CREATE VOLATILE TABLE  ttt  AS (
SELECT
FROM  
WHERE		
  )
WITH DATA  PRIMARY INDEX (Branch_Cust_IP) ON COMMIT PRESERVE ROWS;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have tried to convert the query to sas environment and run it in SAS.&lt;/P&gt;
&lt;P&gt;Please see the general form of the query that I run in sas&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table ttt  (index=(Branch_Cust_IP/unique)) AS
SELECT
FROM 
where    
;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get an error&lt;/P&gt;
&lt;PRE&gt;ERROR: Duplicate values not allowed on index Branch_Cust_IP for file ttt.
NOTE: Compressing data set WORK.ttt decreased size by 40.21 percent. 
      Compressed is 127453 pages; un-compressed would require 213157 pages.
ERROR: Index creation failed for one or more indexes.&lt;/PRE&gt;
&lt;P&gt;My question- How can I solve the problem. Please note that in teradata it is running well.&lt;/P&gt;
&lt;P&gt;Please also note that my connection from sas to teradata base is done by adding&amp;nbsp;TeraData. before the table name (The admin person created this connection between sas and tera so in this issue it is working well)&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 06:08:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Write-tera-query-in-sas/m-p/804957#M317043</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-03-30T06:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Write tera query in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Write-tera-query-in-sas/m-p/804960#M317046</link>
      <description>&lt;P&gt;I found the solution&lt;/P&gt;
&lt;P&gt;Need to write&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create table ttt  (index=(Branch_Cust_IP)) AS&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;instead of&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create table ttt  (index=(Branch_Cust_IP/unique)) AS&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Mar 2022 06:25:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Write-tera-query-in-sas/m-p/804960#M317046</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-03-30T06:25:20Z</dc:date>
    </item>
  </channel>
</rss>

