You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tako Lee edited this page Feb 18, 2014
·
7 revisions
Parameters
Fit into one line if possible
At the same line as CREATE keyword
CREATEFUNCTIONdbo.Fn_gettoporders(@custid ASINT,@n ASINT, @test ASCHAR)
RETURNS TABLE
AS
RETURN
SELECT TOP(@n) *FROMsales.salesorderheaderWHERE customerid = @custid
ORDER BY totaldue DESC
GO