在 sql 中填充 Declaer 对象?
Fill the Declaer object in sql?
我有疑问,也许这在某种程度上很简单,但这是我真正的问题。
我在 SQL 中有一个带有一个参数的标量值函数。我查询我在 select 查询中使用此函数。问题是输入参数是我的 table 列之一。
如何在查询中填写声明对象?
declare @duedate varchar (10)
SELECT FirstName,LastName,SubscribedDate,dbo.GTOP(SubscribedDate) as pers FROM ClubProfile CP
WHERE CP.CardNumber IS NOT NULL
AND IsExpired =0
group by cp.SubscribedDate,FirstName,LastName
set @duedate = (select SubscribedDate from ClubProfile)
SELECT DISTINCT
FirstName,LastName,SubscribedDate,dbo.GTOP(SubscribedDate) as pers
FROM ClubProfile CP
WHERE CP.CardNumber IS NOT NULL
AND IsExpired =0
我有疑问,也许这在某种程度上很简单,但这是我真正的问题。 我在 SQL 中有一个带有一个参数的标量值函数。我查询我在 select 查询中使用此函数。问题是输入参数是我的 table 列之一。 如何在查询中填写声明对象?
declare @duedate varchar (10)
SELECT FirstName,LastName,SubscribedDate,dbo.GTOP(SubscribedDate) as pers FROM ClubProfile CP
WHERE CP.CardNumber IS NOT NULL
AND IsExpired =0
group by cp.SubscribedDate,FirstName,LastName
set @duedate = (select SubscribedDate from ClubProfile)
SELECT DISTINCT
FirstName,LastName,SubscribedDate,dbo.GTOP(SubscribedDate) as pers
FROM ClubProfile CP
WHERE CP.CardNumber IS NOT NULL
AND IsExpired =0