Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DROP TYPE Punkt
- GO
- DROP ASSEMBLY [Punkt_a]
- GO
- CREATE ASSEMBLY [Punkt_a]
- AUTHORIZATION [dbo]
- FROM 'C:\e740\repos\Funkcje\CLR_Struct\CLR_Struct\bin\Debug\CLR_Struct.dll'
- WITH PERMISSION_SET = SAFE
- GO
- CREATE TYPE dbo.Punkt
- EXTERNAL NAME Punkt_a.Punkt;
- DROP TABLE Punkty
- GO
- CREATE TABLE dbo. Punkty
- (ID INT IDENTITY(1,1) PRIMARY KEY, PunktyXY Punkt)
- GO
- INSERT INTO Punkty VALUES (CONVERT(Punkt, '3,4'));
- INSERT INTO Punkty VALUES (CONVERT(Punkt, '1,5'));
- INSERT INTO Punkty VALUES (CAST ('1,99' AS Punkt));
- GO
- SELECT ID, PunktyXY FROM Punkty
- GO
- SELECT ID, PunktyXY.ToString() AS PunktyXY
- FROM Punkty;
- GO
- SELECT ID, CAST(PunktyXY AS VARCHAR)
- FROM Punkty;
- GO
- SELECT ID, CONVERT(VARCHAR, PunktyXY)
- FROM Punkty;
- DECLARE @a Punkt;
- SET @a = CAST('1, 3' AS Punkt)
- SELECT @a, @a.ToString()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement