Hello
I have a query tat someone wrote and run it on teradata.
My task is to run this query in SAS.
Please find the general form of the query that was run on teradata
/***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;
I have tried to convert the query to sas environment and run it in SAS.
Please see the general form of the query that I run in sas
proc sql;
create table ttt (index=(Branch_Cust_IP/unique)) AS
SELECT
FROM
where
;
quit;
I get an error
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.
My question- How can I solve the problem. Please note that in teradata it is running well.
Please also note that my connection from sas to teradata base is done by adding TeraData. before the table name (The admin person created this connection between sas and tera so in this issue it is working well)
I found the solution
Need to write
create table ttt (index=(Branch_Cust_IP)) AS
instead of
create table ttt (index=(Branch_Cust_IP/unique)) AS
I found the solution
Need to write
create table ttt (index=(Branch_Cust_IP)) AS
instead of
create table ttt (index=(Branch_Cust_IP/unique)) AS
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.