I know how to populate table variables by reading from the database, but how can I do this programatically?
Say I have an SQLScript procedure that accepts some input parameters, and I want to return a table variable populated with records defined entirely in my procedure, without reading database tables. What is the syntax for programatically populating records in a table variable in my procedure?
Example code is below:
create type tt_points as table (
xcoord decimal(10, 7),
ycoord decimal(10, 7),
escaped integer
)
CREATE PROCEDURE multi_point
(
out points tt_points
)
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
READS SQL DATA AS
BEGIN
points = ??? how do I programatically fill the table variable with hardcoded values ???
END;