You can certainly do this in a SAS SQL passthru query. You can run normal SAS code including SAS SQL in SAS VA using SAS Studio which comes bundled in a VA (7.x) installation. You would however need SAS/ACCESS to SQL Server or ODBC installed on your VA platform.
Special offer for SAS Communities members
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.