Arşiv

‘scalar function’ Etiketi için arşiv

–Hangi çalışanın hangi kategorideki ürünlerin siparişlerinden ne kadar kazandırdığı hesaplayan function yazınız. create function udf_Hesapla ( @EmployeeID int, @CategoryID int ) returns money as begin declare @toplam money select @toplam=SUM(UnitPrice*Quantity) from [Order Details] where OrderID in ( select OrderID from Orders where EmployeeID=@EmployeeID ) and ProductID in ( select ProductID from Products where CategoryID=@CategoryID ) [...]

103 defa okundu | Henüz yorum yok.
Ağu 15th, 2010 | Filed under Fonksiyonlar