You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Dheeraj Dhiman <dh...@gmail.com> on 2006/04/13 07:38:12 UTC

Run Procedure Switch from sqlserver to apache derby !!

Hello !!
I want to switch from sql server to  apache Derby for my project .
I wanna run a procedure like this in apache derby .

create procedure testProcedure( @personid Integer )
as
select fullName , fatherName, age, income, grosssalary from persons where
personid = @personid ;

But it is not working .
How could i write this procedure in apache derby !!

Thanks & Regards !!
Dheeraj  Dhiman !!

Re: Run Procedure Switch from sqlserver to apache derby !!

Posted by Satheesh Bandaram <sa...@Sourcery.Org>.
Derby supports creating procedures/functions using Java. You can
implement a procedure like this using JDBC.

Please see Derby documentation...
Satheesh

Dheeraj Dhiman wrote:

> Hello !!
> I want to switch from sql server to  apache Derby for my project .
> I wanna run a procedure like this in apache derby .
>
> create procedure testProcedure( @personid Integer )
> as
> select fullName , fatherName, age, income, grosssalary from persons
> where personid = @personid ;
>
> But it is not working .
> How could i write this procedure in apache derby !!
>
> Thanks & Regards !!
> Dheeraj  Dhiman !!
>


Re: Run Procedure Switch from sqlserver to apache derby !!

Posted by Daniel John Debrunner <dj...@apache.org>.
Myrna van Lunteren wrote:

> On 4/12/06, Dheeraj Dhiman <dh...@gmail.com> wrote:
> 
>> Hello !!

> Finally, please stop logging jira issues for questions, and please, please
> stop the annoying exclamation marks.
> 
> Seeing you log a JIRA issue, and seeig those exclamation marks certainly
> made me less interested to answer your question, rather than more, so you're
> achieving the opposite from what I assume you want to.

There are some great guidelines for using the apache mailing lists at:

http://www.apache.org/dev/contrib-email-tips.html
(also linked from http://db.apache.org/derby/derby_mail.html)

I especially like the one linked from contrib-email-tips.html

"How To Ask Questions The Smart Way"
http://www.catb.org/~esr/faqs/smart-questions.html
(note this is a general set of guidelines and not specific to Derby.
Please don't send derby questions to the authors, send them to the
derby-user@db.apache.org list)

Thanks,
Dan.


Re: Run Procedure Switch from sqlserver to apache derby !!

Posted by Myrna van Lunteren <m....@gmail.com>.
On 4/12/06, Dheeraj Dhiman <dh...@gmail.com> wrote:
>
>  Hello !!
> I want to switch from sql server to  apache Derby for my project .
> I wanna run a procedure like this in apache derby .
>
> create procedure testProcedure( @personid Integer )
> as
> select fullName , fatherName, age, income, grosssalary from persons where
> personid = @personid ;
>
> But it is not working .
> How could i write this procedure in apache derby !!
>
> Thanks & Regards !!
> Dheeraj  Dhiman !!
>

Hi !! Dheeraj !! Dhiman !!

Derby does not currently support sql procedures or functions.

You can write a java function to do what you want, see for instance our
manuals, (see the Documentation tab off the main Derby page.), the
Frequently Asked Questions (
For instance: http://db.apache.org/derby/faq.html#null_args
which points to:
http://mail-archives.apache.org/mod_mbox/db-derby-user/200602.mbox/%3c4404E53D.1050605@apache.org%3e
)

Finally, you can search through the derby archives, for instance using
nabble, for examples of issues others have brought up in this area.

Finally, please stop logging jira issues for questions, and please, please
stop the annoying exclamation marks.

Seeing you log a JIRA issue, and seeig those exclamation marks certainly
made me less interested to answer your question, rather than more, so you're
achieving the opposite from what I assume you want to.

Myrna