Subject Re: [firebird-support] Confusing behavior of UDF in stored procedure
Author Martijn Tonies
> can you change your procedure to this:
>
> > CREATE PROCEDURE CreateStringId(val VARCHAR(32765))
> > RETURNS (id CHAR(16))
> > AS BEGIN
> > SELECT varchar_to_guid(:val) FROM RDB$DATABASE INTO :ID;
> > SUSPEND;
> > END^
>
> I have never used the syntax you have used here - not sure it's legal.

Yes, it's legal, functions (albeit system or user defined ones) don't
have to use the SELECT ... FROM RDB$DATABASE.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com