SELECT UDF FROM MS ACCESS

  • Hi,

    I have a table called Table1

    Hiredate

    Ename

    Have UDF

    CREATE FUNCTION dbo.result(@date1 datetime, @date2 datetime)

    RETURNS @Results TABLE (Items varchar(20))

    AS

    BEGIN

    INSERT INTO @Results(Items) SELECT name FROM dbo.Table1 WHERE Hiredate BETWEEN

    dbo.Convert_INTO_GMT_time(@date1) AND dbo.Convert_INTO_GMT_time(@date2)

    RETURN

    END

    GO

    I want to access this UDF from MS Access (probably link table), Is there any way to do this.

  • I don't think you will be able to do that. However you could create a function in Access that duplicates the functionality.

    Why not create a View with the date fields already converted and then link that into Access? Then you can simply use a regular query to grab the data.

    CREATE View vHireDates

    AS

    SELECT name, StartDate = dbo.Convert_INTO_GMT_time(HireDate)

    Gary Johnson

    Microsoft Natural Language Group

    DBA, Sr. DB Engineer




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • Thanks Gary,

    That's what i did.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply