Skip to Main Content

Erasmus Data Service Centre (EDSC) manuals

Overview of manuals provided by the EDSC

The new conditional statement builder in WRDS (Compustat)

by Suraya Farah Gaeta on 2021-03-31T09:40:00+02:00 | 0 Comments

In this example we'll show you some of the new functions of the WRDS conditional statement builder in Compustat. We’ll use an example that shows how to select a SIC range.

First, in step 2 select “Search the entire database”

 

If you try to activate the conditional statement builder and you haven’t selected any variables yet, you”ll get the following error message.

 

 

So first select variables that you want to use in the conditional statement builder. In this example we select “SIC — Standard Industry Classification Code” and “CONML — Company Legal Name”

 

 

Now you can create a conditional statement. Add a rule and specify that  the company name starts with an A, add a group and add a rule where you specify that the sic code starts with a 2. Add another rule to this group and specify that the sic code starts with a 3. Within this group select “OR”. The query preview should look like this:

 

 

The end result of your query is a list of companies with sic >= 2000 and sic <=3999 (sic starts with 2 or 3) and the company name starts with an A.

 


 Add a Comment

0 Comments.

  Recent Posts



Finding Tobin’s Q using Eikon Datastream ‘Expressions’
Replace all formulas in Excel
Once you are finished downloading you might end up with a lot of sheets containing formulas. If you need to replace your formulas by values in all sheets at once you can use this macro.
Bloomberg doesn't export to Excel
Sometimes when you try to export to Excel nothing happens. This blogpost might help you to solve this issue.

  Subscribe



Enter your e-mail address to receive notifications of new posts by e-mail.


  Archive



  Return to Blog
This post is closed for further discussion.