34,588
社区成员
发帖
与我相关
我的任务
分享
select fname=(select fname from fn_GetMoneysfor_sp_SalesRegistration(t.id)) from table as t
CREATE TABLE [dbo].[Tmp_Tbl](
[TypeID] [smallint] NOT NULL,
[TypeName] [nvarchar](128) NULL,
[Caption] [nvarchar](128) NULL
) ON [PRIMARY]
IF OBJECT_ID (N'fn_test') IS NOT NULL
DROP FUNCTION fn_test
GO
CREATE FUNCTION fn_test (@ID Int)
RETURNS TABLE
AS RETURN
(
Select TypeID, TypeName, Caption From Sy_Datatypes Where TypeID=@ID
)
GO
Select *, (Select TypeName from dbo.fn_test(A.TypeID)) TFld from SY_DataTypes a
select fname=(select top 1 fname fn_GetMoneysfor_sp_SalesRegistration(t.id)) from table as t
select fname=(select fname from fn_GetMoneysfor_sp_SalesRegistration(t.id)) from table as t
select fname from dbo.fn_GetMoneysfor_sp_SalesRegistration(1)