proc sql function with character variables

Reply
Contributor
Posts: 20

proc sql function with character variables

Hi.

I am trying to identify the percentage of employee vs.independent directors in a firm. As my output I want to see the percentage of employee ( E in classification column) and percentage of independent ( I t in classification column) for every firm in my sample. The example below is presented just for one company.

I started the code with the usual proc sql command:

proc sql;

create table Outside_Inside_Directors as

select targetcusip,ticker,name,classification, adoptiondate, adoptionyear, year,

TargetCusipadoptionyearYEARTICKERNAMECLASSIFICATION
00437V20032002ACDOACCREDO HEALTHE
00437V20032002ACDOACCREDO HEALTHE
00437V20032002ACDOACCREDO HEALTHI
00437V20032002ACDOACCREDO HEALTHI
00437V20032002ACDOACCREDO HEALTHI
00437V20032002ACDOACCREDO HEALTHE
00437V20032002ACDOACCREDO HEALTHI
00437V20032002ACDOACCREDO HEALTHI
Super User
Posts: 5,437

Re: proc sql function with character variables

Even though this can be solved SQL, I suggest to use proc freq instead. Using that, use tables statement to combine frequencies and percentages for the combination of firm and classification.

Data never sleeps
Ask a Question
Discussion stats
  • 1 reply
  • 163 views
  • 0 likes
  • 2 in conversation