Re: User Defined Functions in ColdFusion

2005-11-09 Thread Thomas Chiverton
On Wednesday 09 November 2005 03:11, simmyana a wrote:
 Hi,
   I have created an UDF in MS sql and I want to use it in coldfusion while
 writing the query. could you please tell me as how to use UDF of MS Sql in
 Coldfusion?

If you can type it into whatever database tool you use, you can use it in 
cfquery...

Typicaly, the contents of cfquery will look like:

select myFunction() as result from dual

or

select myFunctionForThisColumn(columnName)  as result from tableName

if it acts on a table/column.

-- 

Tom Chiverton 
Advanced ColdFusion Programmer

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223686
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


User Defined Functions in ColdFusion

2005-11-08 Thread simmyana a
Hi,
  I have created an UDF in MS sql and I want to use it in coldfusion while 
writing the query.
could you please tell me as how to use UDF of MS Sql in Coldfusion?

Thanks

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223641
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


Calling SQL User Defined Functions from Coldfusion

2005-02-24 Thread Kenton Gray
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


~|
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:196447
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


RE: Calling SQL User Defined Functions from Coldfusion

2005-02-24 Thread Adrian Lynch
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




~|
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:196448
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


RE: Calling SQL User Defined Functions from Coldfusion

2005-02-24 Thread S . Isaac Dealey
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=44477DE=1
http://www.sys-con.com/story/?storyid=45569DE=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


RE: Calling SQL User Defined Functions from Coldfusion

2005-02-24 Thread Adrian Lynch
I had the same thing with two I created, but a third didn't suffer from
needing the owner. I didn't look any further at the reasons at the time. The
only thing that springs to mind is that the site requiring the owner prefix
had CF connecting as a user where as the other one didn't.

Ade

-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: 25 February 2005 01:22
To: CF-Talk
Subject: RE: Calling SQL User Defined Functions from Coldfusion


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=44477DE=1
http://www.sys-con.com/story/?storyid=45569DE=1
http://www.fusiontap.com




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196454
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


RE: Calling SQL User Defined Functions from Coldfusion

2005-02-24 Thread S . Isaac Dealey
It must have something to do with the drivers CF uses to connect to MS
SQL then.

 I had the same thing with two I created, but a third
 didn't suffer from
 needing the owner. I didn't look any further at the
 reasons at the time. The
 only thing that springs to mind is that the site requiring
 the owner prefix
 had CF connecting as a user where as the other one didn't.

 Ade

 -Original Message-
 From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
 Sent: 25 February 2005 01:22
 To: CF-Talk
 Subject: RE: Calling SQL User Defined Functions from
 Coldfusion


 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.


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=44477DE=1
http://www.sys-con.com/story/?storyid=45569DE=1
http://www.fusiontap.com


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196464
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