Hi,
anybody an idea why the following create table within an stored procedure is not working and throwing the error message:
„Invalid Use of table variable"
If i use the variable :RSLT within an insert table statement it works fine, but not for the create.
Thansk in advance
Mike
create procedure"SALES"."GET_SALES"LANGUAGE SQLSCRIPT AS
begin
RSLT = select SH_SHIP_TO_PARTY, NET_SALE_2014, EMPLOYEES, COUNTRY
from :YEAR_SALES_RSLT;
createcolumntable"SALES"."SALES_DATA"as (select * from :RSLT);
end