I have 26 queries to generate final output I want to automate the process and Execute all 26 queries one after another
how to execute all with a single click in the stepwise order
This is a sample query only.
CREATE PROCEDURE Your_Procedure_Name
AS
BEGIN
Write your First Query;
Write your Second Query;
Write your Third Query;
.
.
.
Write your Last Query;
END
And then execute the procedure using:
EXEC Your_Procedure_Name;
It will execute your queries in the above order.
Schematic code follows:
CREATE PROCEDURE ABC
AS
BEGIN
<query 1> ;
<query 2> ;
<query 3> ;
<query 4> ;
<query 5> ;
:
:
END ;
Then:
EXEC ABC ;
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With