我已经用 SQL 编写了这段代码:
alter proc verfinanfiltrado(@valor smallmoney) as
select idconta,vencimento,historico,original,formpagto,planoconta,clifor
from financeiro where original like @valor
这个过程有效,我想写一些类似的东西:
alter proc verfinanfiltrado(@valor smallmoney) as
select idconta,vencimento,historico,original,formpagto,planoconta,clifor
from financeiro where original like % @valor %
例如,该过程与 746.06 一起使用,但我想显示以 746 开头的所有值,例如 746.06、746.10、748.12
在 nvarchar 的情况下?
alter proc verfinanfiltrado(@histo smallmoney) as
select idconta,vencimento,historico,original,formpagto,planoconta,clifor
from financeiro where historico like % @histo %