how to delete the duplicate columns permanently in SQL

Answers were Sorted based on User's Feedback



how to delete the duplicate columns permanently in SQL..

Answer / chandrakanth

proc sql;
create table dataset-name as select distinct(variable-name),list-all-the-variables-you-want from dataset-name;
quit;

please let me know if you have any questions

Is This Answer Correct ?    4 Yes 3 No

how to delete the duplicate columns permanently in SQL..

Answer / naveen

data aaa;
input P_Id LastName $ FirstName $ City $;
cards;
1 Hansen Ola Sandnes
2 Svendson Tove Sandnes
3 Pettersen Kari Stavanger
;
run;
proc sql;
select distnict(city)
from aaa;
quit;

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SAS Interview Questions

how to remove the duplicates by proc sql?

2 Answers   Genpact,


What is instream data in SAS?

1 Answers  


i have a dataset with var1,var2,var3; i want to upload the titles for the variables . How can we?

1 Answers   GSK,


Which are SAS Windows Clients & SAS Java Clients

3 Answers   TCS,


where are dashboard components are created and maintained? : Sas-bi

0 Answers  






What is the purpose of trailing @ and @@? How do you use them?

0 Answers  


Which function is used to count the number of intervals between two sas dates?

0 Answers  


What does error:1 mean?

8 Answers   Accenture,


Hi im new to sas. I have a file with some charecter variables and some numeric variables now i want to load charecter variables into one datastep and numeric variables into another data step pls let me know Thanks

2 Answers  


Differentiate between sas functions and sas procedures.

0 Answers  


describe about joins? briefly?

2 Answers   CitiGroup,


data voter; input Age Party : $1. (Ques1-Ques4)($1. + 1); datalines; 23 D 1 1 2 2 45 R 5 5 4 1 67 D 2 4 3 3 39 R 4 4 4 4 19 D 2 1 2 1 75 D 3 3 2 3 57 R 4 3 4 4 ; Idont understand what the (Ques1-Ques4)($1. + 1) means. I have seen (Ques1-Ques4)(4*$1.), but what is (Ques1-Ques4)($1. + 1)? Appreciate all help Thanks

3 Answers  


Categories