SQL语句拼接的难题 declare @qcyed numeric(28, 8) declare @qcyec numeric(28, 8) declare @bqbdd numeric(28, 8) declare @bqbdc numeric(28, 8) declare @t varchar(10) set @qcyed=120 set @qcyec=200 set @bqbdd=350 set @bqbdc=500 set @t='Z'
declare @upsql nvarchar(MAX) SET @upsql=N'UPDATE tb_Rpt_ZCFZ SET Col=dbo.SetYE('+@qcyed+','+@qcyec+','+@bqbdd+','+@bqbdc+','+@t+') WHERE Sort=00' print @upsql