temporary table losing results
struggling with stored procedure
I'm
- creating a temporary table
- writing records to it
- trying to return the rows from the tabl
I get the correct number of rows returned
but all the data is NULLs
here's the code
begin
declare name varchar(50);
declare caption varchar(50);
declare groups varchar(50);
declare sortorder integer;
declare systemflag varchar(50);
declare hint varchar(50);
declare script varchar(50);
declare formtype varchar(50);
create temporary table results
(
name varchar(50),
caption varchar(50),
groups varchar(50),
sortorder integer,
hint varchar(50),
script varchar(50),
formtype varchar(50)
);
insert into results (name, caption, groups, sortorder, hint, script, formtype) values ('name', 'caption', 'groups', 1, 'hint', 'script', 'form');
insert into results (name, caption, groups, sortorder, hint, script, formtype) values ('name', 'caption', 'groups', 2, 'hint', 'script', 'form');
select name, caption, groups, sortorder, hint, script, formtype from results order by sortorder, name;
end