> You mean this?
> declare @MyVar int
> select @MyVar = SomeColumnName
> from tableA
> exec someproc @Threshold = @MyVar
> "Curious" <fir5tsi@yahoo.com> wrote in message
> news:1181000908.159903.149000@q69g2000hsb.googlegroups.com...
>> Hi,
>> I have a scheduler job that's defined as below:
>> EXEC dbo.spCheckSystemFailure @Threshold = 5
>> Now the Threshold is stored in a database table, "SystemParameter".
>> The way to get @Threshold is by executing the following statement:
>> SELECT SystemParameterValue
>> FROM SystemParameter
>> WHERE SystemParameterName = 'Threshold'
>> Anyone can tell me the best way to streamline this job, i.e., to get
>> Threshold from "SystemParameter" table,and execute the stored
>> procedure with this value as @Threshold?
>> Thanks!