how to delete the duplicates by using proc sql?

Answers were Sorted based on User's Feedback



how to delete the duplicates by using proc sql?..

Answer / shivakrishna.yenaganti

Proc SQL noprint;
create table unique as select distinct (*) from dsn;
quit;

Is This Answer Correct ?    22 Yes 2 No

how to delete the duplicates by using proc sql?..

Answer / arpit

proc sql;
select distinct (*) from sasuser.xyz;
quit.

Is This Answer Correct ?    6 Yes 0 No

how to delete the duplicates by using proc sql?..

Answer / chowdary

In constraints time using unique
In datasets using distinct()

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SAS Interview Questions

In this question, I rename the numeric variable phone to numphone and then try use phone=put(numphone,comma16.) to store the numeric value numphone as a string value in phone. But I get a warning tha numphone already exists and in the data sat phone doesnt exist and numphone is set to missing. Why? data names_and_more; input Name $20. Phone : comma16. Height & $10. Mixed & $8.; Name = tranwrd(Name,' ',' '); rename phone = numphone; phone = put(numphone,comma16.); datalines; Roger Cody 9,087,821,234 5ft. 10in. 50 1/8 Thomas Jefferson 3,158,488,484 6ft. 1in. 23 1/2 Marco Polo 8,001,234,567 5Ft. 6in. 40 Brian Watson 5,183,551,766 5ft. 10in 89 3/4 Michael DeMarco 4,452,322,233 6ft. 76 1/3 ;

1 Answers  


what are all the reports you generated in your recent project?

0 Answers   Accenture, Quintiles,


What is the basic syntax of a sas program?

0 Answers  


HOW MANY WAYS YOU CAN RETRIEVE THE DATA FROM ORACLE TABLES? WHAT IS ORACLE CLINICAL? HOW IT IS USEFUL?

3 Answers   Accenture, Novartis,


What is difference between Global n Local Macro Variables..?

6 Answers   TCS,






What are the rows present in protocol Violation table?

2 Answers   Accenture, Quintiles,


What is a put statement?

0 Answers  


What is the sas data set? : sas-grid-administration

0 Answers  


what is the need of INDEX in datasets?

6 Answers   CitiGroup,


Describe what are the different levels of administrative users in sas? : sas-grid-administration

0 Answers  


What are SAS/ACCESS and SAS/CONNECT?

0 Answers  


How do you specify the number of iterations and specific condition within a single do loop?

0 Answers  


Categories