I wrote a SQL Server UDF just the other day to remove time information
from a date column... pretty straightforward...

<cfquery ...>
        select mydatecolumn, x, y, z
        from mytable
        group by dbo.trimDate(mydatecolumn), x, y, z
</cfquery>

In my experience I had to specify the owner of the function for SQL
Server to find it -- I'm not sure why this is as our CF sql server
login is the dbo on the database. It may have something to do with the
fact that we use a single CF DSN and reference the fully-qualified
table names, i.e. databasename.dbo.tablename.

> <cfquery ...>
>       yourSQLUDF()
> </cfquery>

> It should be that simple, you may need to sort out
> permissions though.

> Ade

> -----Original Message-----
> From: Kenton Gray [mailto:[EMAIL PROTECTED]
> Sent: 25 February 2005 00:54
> To: CF-Talk
> Subject: Calling SQL User Defined Functions from
> Coldfusion


> I'm currently trying to port an app from .net to
> coldfusion (for
> various reasons), but the app uses microsoft sql server
> user defined
> functions. I can't seem to find any reference on how to
> call them from
> coldfusion, or if it's even possible.

> Searching on google gives me alot of results for how to
> create
> coldfusion user defined functions and how to create sql
> user defined
> functions, but no information on how to use sql udfs in
> coldfusion :)

> So hopefully everyones head didn't explode from trying to
> understand me,

> Thanks
> Kenton


s. isaac dealey     954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://macromedia.breezecentral.com/p49777853/
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196451
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to