Copy a function

aprosper posted 6 years ago in General
Sorry in advance because English isn't my native language ;)

How can we copy a function to create a similar new one in the same database.

For example :
I've a function and I need e similar function, with a few changes in the body.

It would be nice if it was possible to click right in the tree of the object's database, to copy than paste the selected function to duplicate it with a new name.
jfalch posted 6 years ago
click the function in tree
on the right, click tab "Function: xxx"
below it, click tab "CREATE code"
click in the text field below it (containing CREATE ...)
from "Edit" menu on top, select "Select All", then "Copy"
on the right, click "Query" Tab
from "Edit" menu on top, select "Paste"
you can now edit the function defintion, change name etc
when new function def is ready, press F9 to install it
aprosper posted 6 years ago
Thank you for that proc├ędure.

It's OK but a little more complex than a simple copy/paste from the tree... but it's work so... smile

Please login to leave a reply, or register at first.