I've got it  - you are missing the final semicolon after END month and END
year. Running without them leads to this:

CREATE FUNCTION month (MyDate DATE) RETURN NUMBER IS BEGIN RETURN
extract(MONTH FROM MyDate);
END month
Warning: Function created with compilation errors
 
Notice that no ORA error was thrown - it was created. It just compiled
badly. Hence, CF doesn't error either (I did this with TOAD).

Add the semicolons and you'll be OK. It all still needs to be on one line.

-----Original Message-----
From: Rick Root [mailto:[EMAIL PROTECTED] 
Sent: Friday, 4 February 2005 11:08 
To: CF-Talk
Subject: Re: Creating Oracle Functions in CFQUERY revisited

James Holmes wrote:
> You stil have AS in the Year Fn
> 
> RETURN NUMBER AS BEGIN
> 
> Should be IS

Changed, still getting the same error.

As a side note, why wouldn't invalid syntax cause the create function
statement to error?

  - Rick



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