USE adventureworks
GO

-- create the assembly
CREATE ASSEMBLY MetricConverter
FROM 'c:\types\metricconverter.dll'
GO

-- drop the assembly
DROP ASSEMBLY MetricConverter
GO

-- attempt CREATE ASSEMBLY WITH a different name
CREATE ASSEMBLY foo
FROM 'c:\types\metricconverter.dll'
GO 

-- drop the assembly
DROP ASSEMBLY foo
GO

-- attempt CREATE ASSEMBLY WITH a different case
CREATE ASSEMBLY METRICCONVERTER
FROM 'c:\types\metricconverter.dll'
GO 

CREATE FUNCTION KilogramsToPounds (@a float)
returns float
external name MetricConverter.[MetricFunctions.MetricConverter].KilogramsToPounds
GO

-- USE it
DECLARE @x float
DECLARE @y float
set @x = 10
set @y = dbo.KilogramsToPounds(@x)
print @y
GO


-- drop it
DROP FUNCTION KilogramsToPounds
GO

-- attempt CREATE FUNCTION WITH a different case
CREATE FUNCTION KilogramsToPounds (@a float)
returns float
external name MetricConverter.[MetricFunctions.MetricConverter].KilogramsToPOUNDS
GO

-- drop it
DROP FUNCTION KilogramsToPounds
DROP ASSEMBLY metricconverter
GO