Home > Archive > SQL Anywhere database > October 2005 > Re: hi - how to create a function









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: hi - how to create a function
Mark Culp

2005-10-27, 7:41 am

a quick example:

create function foo()
returns long varchar
begin
declare v long varchar;

select col
into v
from tab
where pk = 'somevalue';
return v;
end;

Please refer to the documentation for more information.
See
ASA SQL Reference Manual
4. SQL Statements
CREATE FUNCTION statement
--
Mark Culp
SQLAnywhere Research and Development
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------
RAMENCAS wrote:
>
> How can I create a function that return a value from a table
>
> --
> Rafael Antonio Mendoza Castillo
> ramencas@softwaredev
enezuela.com
> ramencas@gmail.com
>
> Solo MSN: ramencas@hotmail.com

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com