Dear all,
In SQL Server you can pass a string variable or literal string to an EXECUTE statement thus:
execute stringvar)
/* Where :stringvar is varchar with value 'select * from table'
--OR*/
Execute ('select * from table')
I'm using Marathon 1.1 to try and replicate this function, so as to automate a procedure by passing different subqueries multiple times.
I want my SP to be structured like this:
create procedure SP as
declare variable queryA varchar(50);
declare variable queryB varchar(50);
begin
queryA = 'select * from tableA'
queryB = 'select * from tableB'
insert into tableD
select
(execute queryA) as resultA,
(execute queryB) as resultB
from tableC
end
Does anyone have an idea as to how to do this in Marathon?
Best,
L
In SQL Server you can pass a string variable or literal string to an EXECUTE statement thus:
execute stringvar)
/* Where :stringvar is varchar with value 'select * from table'
--OR*/
Execute ('select * from table')
I'm using Marathon 1.1 to try and replicate this function, so as to automate a procedure by passing different subqueries multiple times.
I want my SP to be structured like this:
create procedure SP as
declare variable queryA varchar(50);
declare variable queryB varchar(50);
begin
queryA = 'select * from tableA'
queryB = 'select * from tableB'
insert into tableD
select
(execute queryA) as resultA,
(execute queryB) as resultB
from tableC
end
Does anyone have an idea as to how to do this in Marathon?
Best,
L