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

Hi, I have one dataset, could you please ans for this. id amount paid_amount 1 700 400 2 900 250 3 300 300 a 400 250 b 500 320 c 800 650 x 200 190 y 900 250 z 300 180 i want create new dataset having id and paid_amount who are paid high amount comparing amount. ex: 1d paid_amount 3 300 c 650 x 190

3 Answers  


If you were told to create many records from one record show how you would do this using arrays and with PROC TRANSPOSE?

1 Answers   HCL, Quintiles,


what is OLAP?

4 Answers   CitiGroup, TCS,


What is the difference between class statement and by statement in proc means?

1 Answers  


WHAT DOES A SAS SPECIFICATION DOCUMENT SDS CONTAIN ?

1 Answers  


Differentiate input and infile.

1 Answers  


When looking for data contained in a character string of 150 bytes, which function is the best to locate that data: scan, index, or indexc?

2 Answers   Accenture,


What are the best sas programming practices for handling very large datasets? : sas-grid-administration

1 Answers  


Code a PROC MEANS that shows both summed and averaged output of the data.

5 Answers  


How to limit decimal places for the variable using proc means?

1 Answers  


how many data types in sas? : Sas-administrator

1 Answers  


how can u join the two tables without using proc sql Joins and nested queries ?

6 Answers   IBM,


Categories