NAME Invoke-SasSql SYNOPSIS Executes the SQL command in the specified SAS workspace server session. SYNTAX Invoke-SasSql [-Workspace] <PSObject> [<CommonParameters>] Invoke-SasSql [-SqlCommand] <String> [<CommonParameters>] DESCRIPTION Use this command for SQL operations CREATE, ALTER, UPDATE, INSERT, DELETE and DROP PARAMETERS -Workspace <PSObject> SAS.Workspace object Required? true Position? 0 Default value Accept pipeline input? true (ByValue) Accept wildcard characters? false -SqlCommand <String> SQL command Required? true Position? 1 Default value Accept pipeline input? false Accept wildcard characters? false <CommonParameters> This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). INPUTS OUTPUTS NOTES -------------- Example 1 -------------- PS C:\> Invoke-SasSql $ws "CREATE TABLE work.x AS SELECT * FROM sashelp.class" -------------- Example 2 -------------- PS C:\> Invoke-SasSql $ws "UPDATE work.x SET column = 'test' WHERE column = 'abc' " -------------- Example 3 -------------- PS C:\> Invoke-SasSql $ws "DELETE FROM work.x WHERE column = 'abc' " -------------- Example 4 -------------- PS C:\> Invoke-SasSql $ws "CREATE INDEX columnname ON work.x (columnname) " -------------- Example 5 -------------- PS C:\> Invoke-SasSql $ws "DROP TABLE work.x" RELATED LINKS