Re: GetDate as Parameter for UDF Function returns table

From: Steve Kass (skass_at_drew.edu)
Date: 10/24/04


Date: Sun, 24 Oct 2004 10:52:48 -0400

Liam,

  Table-valued functions can only receive literal constants and variables
as parameters. Functions, expressions, and column references cannot
be used as parameters.

Steve Kass
Drew University

Liam Ponder wrote:

>Help!!
>
>I am trying to pass GetDate() as a paramter into a function that returns a
>table.
>
>select * from
>dbo.hta2_Calculate_Closed_Inventory_By_Date( GetDate(),'10/30/2004','Company')
>
>This fails but it works if I pass in the date as a string. I need to use
>GetDate.
>
>I cannot create a local variable, this is a view.
>
>



Relevant Pages

  • Re: From clause with parenthese - Posted once but server error
    ... Steve Kass ... Drew University ... Kalvin wrote: ... >documentation on this, but am working on a procedure written by ...
    (microsoft.public.sqlserver.programming)
  • Re: just a silly thing maybe...
    ... plan and that has nothing to do with the countaggregate. ... Steve Kass ... Drew University ...
    (microsoft.public.sqlserver.programming)
  • Re: RTRIM function doesnt work
    ... replace it, as suggested, with CHAR, the "regular" space. ... Scott wrote: ... >>Steve Kass ... >>Drew University ...
    (microsoft.public.sqlserver.programming)
  • Re: CASE ORDER BY Date sort
    ... case when @sortID not in then ... Steve Kass ... Drew University ... Alex Ting wrote: ...
    (microsoft.public.sqlserver.programming)
  • Re: Function parameters
    ... Steve Kass ... Drew University ... DrLostinExcel wrote: ... >returns int ...
    (microsoft.public.sqlserver.programming)