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

In the SAS Data step what is the difference between the subsetting done by Where and subsetting done by If?

6 Answers   Cognizant,


Explain data step in SAS

0 Answers  


how sas deals with business intelligence? : Sas-bi

0 Answers  


What’s the difference between var b1 – b3 and var b1 — b3?

0 Answers  


how does sas handle missing values in functions? : Sas programming

0 Answers  






you have a data set like this. data qqq; input name $ total; cards; qq 22 ww 33 qq 22 ee 44 rr 33 ww 44 ; run; and you want output like this......... name total qq 22 ww 44 Do it by data set step.

6 Answers  


What is the purpose of _character_ and _numeric_?

0 Answers  


explain the use of % includes a statement in sas? : Sas-administrator

0 Answers  


describe about joins? briefly?

2 Answers   CitiGroup,


what is incremental update ? is this possible in SAS OLAP CUBE STUDIO.

1 Answers   TCS,


Hi, Does anybody has lastest SAS certification(base, adv., clinical)dumps,if anybody has please email me at mailtorajani76@gmail.com. Thanks

0 Answers   Axis Bank,


How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?

0 Answers  


Categories