Microsoft SQL Stored Procedure
--stored procedure with input parameters
create procedure CallDirection(@product varchar(10))
as
begin
SELECT [Product]
,[Low]
,[High]
,[Close]
,[Previous]
,[Direction]
FROM [test].[dbo].[options ftse]
where @product=Product
end;
--execute the stored procedure with a product value inputted
execute CallDirection '01/02/18';

--stored procedure with input parameters
create procedure CallDirection(@product varchar(10))
as
begin
SELECT [Product]
,[Low]
,[High]
,[Close]
,[Previous]
,[Direction]
FROM [test].[dbo].[options ftse]
where @product=Product
end;
--execute the stored procedure with a product value inputted
execute CallDirection '01/02/18';
No comments:
Post a Comment