• hi Matt,

    thanks for your kind reply,

    when i created that function, and executed it like this,

    CREATE FUNCTION dbo.testFunction

    (@STARTDATE datetime,@EntDt datetime)

    RETURNS TABLE

    AS

    RETURN

    with DateList as

    (

    select cast(@STARTDATE as datetime) DateValue

    union all

    select DateValue + 1 from DateList

    where DateValue + 1 < convert(VARCHAR(15),@EntDt,101)

    )select * from DateList where DATENAME(WEEKDAY, DateValue ) not IN ( 'Saturday','Sunday' )

    GO

    select dbo.testFunction(getdate(),getdate()+30);

    Msg 4121, Level 16, State 1, Line 1

    Cannot find either column "dbo" or the user-defined function or aggregate "dbo.testFunction", or the name is ambiguous.

    guidance needed,

    thanks in advance.

    ___
    Known Is An Drop,Unknown Is An Ocean....
    Njoy Programming
    🙂