Showing posts with label SQLCLR. Show all posts
Showing posts with label SQLCLR. Show all posts
Sunday, January 17, 2010
Sunday, December 13, 2009
Saturday, December 12, 2009
Using CLR Integration in SQL
Friday, December 11, 2009
SQLCLR : Table Valued Function
using System;
using Microsoft.SqlServer.Server;
using System.Collections;
using System.Data.SqlTypes;
using System.Collections.Generic;
class Product
{
public int Quantity { get; set; }
public string Description { get; set; }
}
public partial class UserDefinedFunctions
{
[SqlFunction(TableDefinition = @"Quantity int,
Description nvarchar(100)",
Name = "Products",
FillRowMethodName = "FillRowProduct")]
public static IEnumerable GetProducts()
{
ListlstPerson = new List ();
lstPerson.Add(new Product { Quantity = 1, Description = "Ball" });
lstPerson.Add(new Product { Quantity = 10, Description = "Bike" });
lstPerson.Add(new Product { Quantity = 5, Description = "Club" });
lstPerson.Add(new Product { Quantity = 10, Description = "Bat" });
return lstPerson;
}
public static void FillRowProduct(Object obj, out SqlInt32 Quantity, out SqlChars Description)
{
Product p = (Product)obj;
Description = new SqlChars(p.Description);
Quantity = new SqlInt32(p.Quantity);
}
};
<--->
SELECT Prod.*
FROM dbo.Products() AS Prod
Quantity Description
1 Ball
10 Bike
5 Club
10 Bat
Thursday, December 10, 2009
SQL CLR Table-Valued Functions
http://msdn.microsoft.com/en-us/library/cc655659%28SQL.90%29.aspx
http://msdn.microsoft.com/en-us/library/ms131103.aspx
http://netindonesia.net/blogs/kasim.wirama/archive/2008/12/30/sql-clr-user-defined-function.aspx
http://www.soliddotnet.com/index.php/2009/09/23/insert-value-using-table-value-functions-tvf/
http://msdn.microsoft.com/en-us/library/ms131103.aspx
http://netindonesia.net/blogs/kasim.wirama/archive/2008/12/30/sql-clr-user-defined-function.aspx
http://www.soliddotnet.com/index.php/2009/09/23/insert-value-using-table-value-functions-tvf/
Subscribe to:
Posts (Atom)