26 lines
2.0 KiB
Transact-SQL
26 lines
2.0 KiB
Transact-SQL
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[foo_SplitSensorCalibrationRecord]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
|
||
DROP FUNCTION [dbo].[foo_SplitSensorCalibrationRecord]
|
||
GO
|
||
SET ANSI_NULLS OFF
|
||
GO
|
||
SET QUOTED_IDENTIFIER OFF
|
||
GO
|
||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[foo_SplitSensorCalibrationRecord]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
|
||
BEGIN
|
||
execute dbo.sp_executesql @statement = N'CREATE FUNCTION [dbo].[foo_SplitSensorCalibrationRecord](@source [nvarchar](max), @delimiter [nvarchar](max))
|
||
RETURNS TABLE (
|
||
[Sensitivity] [float] NULL,
|
||
[Poly] [nvarchar](255) NULL,
|
||
[AtCapacity] [bit] NULL,
|
||
[EngineeringUnits] [nvarchar](50) NULL,
|
||
[Excitation] [nvarchar](50) NULL,
|
||
[CapacityOutputIsBasedOn] [int] NULL,
|
||
[SensitivityUnits] [nvarchar](50) NULL,
|
||
[ZeroPoint] [float] NULL
|
||
) WITH EXECUTE AS CALLER
|
||
AS
|
||
EXTERNAL NAME [SplitRecord].[SplitRecord.SensorCalibration].[SplitSensorCalibrationRecord]'
|
||
END
|
||
|
||
GO
|