MagnusArias

SBO | Funkcje 3 SQL

Nov 30th, 2019
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.69 KB | None | 0 0
  1. DROP AGGREGATE LAczZnakiA
  2. GO
  3. DROP AGGREGATE LiczZnakiA
  4. GO
  5. DROP AGGREGATE GeoAve
  6. GO
  7. DROP ASSEMBLY GeoAveA
  8. GO
  9. CREATE ASSEMBLY GeoAveA
  10. FROM 'C:\e740\repos\Funkcje\FunkcjeAgregujace\FunkcjeAgregujace\bin\Debug\FunkcjeAgregujace.dll'
  11. WITH PERMISSION_SET = SAFE;
  12. GO
  13. CREATE AGGREGATE GeoAve(@s FLOAT)
  14. RETURNS FLOAT
  15. EXTERNAL NAME GeoAveA.GEOAVE;
  16. GO
  17. CREATE AGGREGATE LiczZnakiA(@s nvarchar(MAX))
  18. RETURNS INT
  19. EXTERNAL NAME GeoAveA.LiczZnaki;
  20. GO
  21. CREATE AGGREGATE LaczZnakiA(@s nvarchar(MAX))
  22. RETURNS nvarchar(255)
  23. EXTERNAL NAME GeoAveA.LaczZnaki;
  24. GO
  25.  
  26. SELECT IdDzialu, dbo.LiczZnakiA(Imie)
  27. FROM Osoby
  28. GROUP BY IdDzialu
  29.  
  30. SELECT IdDzialu, dbo.LaczZnakiA(Imie)
  31. FROM Osoby
  32. GROUP BY IdDzialu
Add Comment
Please, Sign In to add comment