2
Reply

Dynamic script.

Maahi

Maahi

Sep 5 2017 9:27 PM
163
Declare @ClientServicecode as varchar(5000)
set @ClientServicecode = select Client_Code + '_' + REPLICATE('0',4-LEN(RTRIM(Service_Type_Code))) + RTRIM(Service_Type_Code) as ClientServiceCode
from JobTable
 
exec  @ClientServicecode
 
getting issue while framing a dynamic query of above. 

Answers (2)