I want to have my spreadsheet connect to SQL Server with variables...?

K

Kelvin

I have this Stored Procdure but don't know how to incorporate variables into
it.
I've added the declare statements and what I think the variables should be
and where I think they should go.
I have an example of the code for Excel, if I can just get these variables
to work....

Any help would be appreciated

Kelvin
++++++++++++++++++++++++++++++++++++++++++++++
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO

-- CREATE PROCEDURE [dbo].[CIT_SV_TechLaborByRo]
ALTER PROCEDURE [dbo].[CIT_SV_TechLaborByRo]

AS
BEGIN

DECLARE @RoNumber (this would be equal to the [SlsId])
DECLARE @TechID (this would equal [EmpIdLbr])

SELECT SVSLSITM.HrsActual
FROM SVSLSITM

WHERE [SVSLSITM].[SlsId]= @RoNumber
AND [SVSLSITM].[EmpIdLbr]= @TechID;

END
++++++++++++++++++++++++++++++++++++++++++++++
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top