Create Table As Select
Hi, I need to build some tables in the application database. I am using a extensibility rule with a StringBuilder and the BRAPi.Database.ExecuteActionQuery command to do that.
The "Create table" command is working fine. Eg:
sqlScript.AppendLine("CREATE TABLE [PayrollMapping](")
sqlScript.AppendLine("[Payroll] varchar(255),")
sqlScript.AppendLine("[Pay_Basis] varchar(255),")
sqlScript.AppendLine("[Salary_Annual_Factor] Int")
sqlScript.AppendLine(") On [PRIMARY]")
But I cannot make the "Create table as select" command work. Eg this does not work (Error: Incorrect syntax near the keyword 'Select')
sqlScript.AppendLine("CREATE TABLE [EBSRegister] As")
sqlScript.AppendLine("Select [RegisterID], [FirstName], [LastName]")
sqlScript.AppendLine("From XFW_PLP_Register")
Is the "Create table as select" not a valid command for the OneStream BRAPi.Database or is there simply something wrong with the syntax above?
Thank you
