
use pubs
GO

CREATE TABLE dbo.Tiles(
	id     INTEGER,
	length LDim,
	width  LDim
)
GO

INSERT dbo.Tiles VALUES (1, '12 ft', '1 ft')
INSERT dbo.Tiles VALUES (1, '18 in', '2.9 ft')
GO

SELECT * FROM dbo.Tiles
GO

CREATE FUNCTION AddLDim2 (@a LDim, @b LDim)
RETURNS LDim
AS
BEGIN
 DECLARE @c LDim
 SET @c = '0 in'
 SET @c.Inches = @a.Inches + @b.Inches
 RETURN @c
END
GO



