SQLTeam.com | Weblogs | Forums

Stored Proc parameters from a table?


I'm really rusty with stored procedures so would appreciate some help.

We are looking to build something in Excel where the user enters a start date and an end date into two cells and a piece of VBA / SQL code uploads those two values into a database table.

Is it possible to execute a stored procedure that captures the two values and uses them as parameters?

So my procedure would be called EXEC dbo.Monthly_Report startdate enddate

Hopefully that makes sense. Any advice appreciated.

Hey Ronaldhino

Do you currently have an existing eco system of excel based tooling like you describe or is this something new?

I have no idea what "existing eco system of excel based tooling" is or means.

If you mean "do we use VBA in Excel to connect to databases and draw down data" then the answer is yes.

That's very good and thank you for that - doesn't quite answer my original query though.

Which was "can I use values from a table as parameters in a stored procedure?"

:laughing: oops.

Declare @date datetime

Select @date = createddate
From dbo.Fejuad where id = 234

Exec ptojects_sp(@date)
1 Like