Hi All,
In SAS DI, where can I use calculated column(newly derived in the same block) in SAS DI.
Thanks
Hi VVDR,
I mean you are referring calculated column in SQL and applying in SQL or Extract transformation.
As in normal SQL, calculated columns are created using aggregated functions. You can use them in output under "select" part of SQL with user defined name for column or under "Having" part of SQL to filter after calculation. Under Having part, referring column name defined in select part for aggregate function need to be prefixed with "Calculated" word.
Same applies in DI Studio, navigate to the SQL transformation to select => mappings there you can create new column and write the aggregate function under expression.
Hi VVDR,
I mean you are referring calculated column in SQL and applying in SQL or Extract transformation.
As in normal SQL, calculated columns are created using aggregated functions. You can use them in output under "select" part of SQL with user defined name for column or under "Having" part of SQL to filter after calculation. Under Having part, referring column name defined in select part for aggregate function need to be prefixed with "Calculated" word.
Same applies in DI Studio, navigate to the SQL transformation to select => mappings there you can create new column and write the aggregate function under expression.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.