I have a select statement that I need to call a SPROC and return a value as one of the values
I have a SPROC called DB_ext.dbo.uspCalcAvgLeadTime that I need to pass a product Item Number (iv2.itemnmbr)
Below is the statement I'm trying to use, what am I doing wrong?
Thanks as always
, exec DB_ext.dbo.uspCalcAvgLeadTime(iv2.itemnmbr) as CalcAverageLeadTime
from iv00101 iv1
join iv00102 iv2 on iv2.itemnmbr=iv1.itemnmbr
left join iv00103 iv3 on iv3.itemnmbr=iv1.itemnmbr