Hi
Is there a way of creating calculated columns with the query builder in SAS Studio (SAS9.4 M2 for Linux) like there is in Enterprise Guide? It's pretty useless as a query tool without it!
I can't see a way by default, but the code generated is below and can be modified, so you can add your computed column directly to the code.
This doesn't mean one doesn't exist - just that it's not intuitively obvious.
Annoying, but easily worked around for sure.
Hi
I can see you can generate code and edit it but it sort of destroys the point of visual programming. Odd that they have not incorporated such a basic feature. It makes it a hard sell to get the team to use visual programming if the functionality is very low.
Please could you provide the code? I have the same problem. Thanks
@vazmena1 wrote:
Please could you provide the code? I have the same problem. Thanks
Please post a new question, not add on to a several year old one.
Build your code using the query builder and then copy the code to a code node. Then manually add in the calcuations you want.
It follows the format below, in red, with the BMI calculation.
proc sql;
create table WANT as
select age, name, weight, weight/height**2 as BMI
from sashelp.class;
quit;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.