Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8644

Re: SQLScript Table Variables - how to populate table variables in code?

$
0
0

Couple of ways to do this, but the easiest would probably something like this.

 

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 = select '123.456' as xcoord,

                '654.321' as ycoord,

                '5' as escaped

                         from dummy;

  

END;

 

CHeers,

Rich Heilman


Viewing all articles
Browse latest Browse all 8644

Trending Articles